c2342
(C2342)
March 25, 2022, 4:31am
1
Hi,
This might be a bit of an odd one but I’m trying to make my Yale SL (via August integration) appear to be also a Garage Door. The reason for it is that Apple CarPlay lets me unlock a Garage but not my front door via the dashboard shortcut that appears when close to home.
I’ve tried to do this via a cover template but I think I’m missing something:
cover:
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: "Garage Test Door"
position_template: "{{ states('lock.door') }}"
open_cover:
- service: lock.unlock
data:
entity_id: lock.door
close_cover:
- service: lock.lock
data:
entity_id: lock.door
Indentation is off and you shouldn’t use postion_template
, among others.
Carefully read the meaning of each field in the docs and look at the examples for correct indentation.
Try this:
cover:
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: "Garage Test Door"
value_template: "{{ is_state('lock.door', 'unlocked') }}"
open_cover:
- service: lock.unlock
target:
entity_id: lock.door
close_cover:
- service: lock.lock
target:
entity_id: lock.door
Note: This is untested and I don’t have smart locks to simulate this.
EDIT: Fixed the cover state.
1 Like
tom_l
March 25, 2022, 5:42am
3
Looks good Pieter, except this:
value_template: "{{ states('lock.door') }}"
Should be:
value_template: "{{ is_state('lock.door', 'unlocked') }}"
So when the lock is unlocked the garage door state is open.
1 Like
Thanks for catching. I’ll update my post.
1 Like
c2342
(C2342)
March 26, 2022, 4:57am
5
Brilliant that worked! Thanks to both of you!