Files
homeassistant/cover.yaml
2021-10-23 15:58:20 -04:00

21 lines
632 B
YAML

- platform: template
covers:
garage_door:
friendly_name: "Garage Door"
#This is what defines your garage door as being open (your sensor reports 7)
value_template: "{{ is_state('binary_sensor.garage_door_sensor', 'on') }}"
open_cover:
service: switch.toggle
data:
entity_id: switch.garage_door
close_cover:
service: switch.toggle
data:
entity_id: switch.garage_door
icon_template: >-
{% if is_state('binary_sensor.garage_door_sensor', 'on') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}