Hi
I have a (template) Cover for the garage door and wanted to change the icon based of 2 binary sensors (2 reed switch’s) one for open one for closed ?.
Here is the cover
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: "Garage Door"
position_template: "{{ states('sensor.garage_door') }}"
open_cover:
service: switch.turn_on
data:
entity_id: switch.garage_door_control
close_cover:
service: switch.turn_on
data:
entity_id: switch.garage_door_control
icon_template: >-
{% if states('sensor.garage_door')|float > 0 %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}
The binay switchs are
binary_sensor.garage_door_is_closed and binary_sensor.garage_door_is_open they are either on/off to state if the door is closed or open
Thanks Andrew
2 posts - 2 participants