Hello Folks,
So for the very first time after using HA for more than 3 months, I am using templates. In this case, I am combining my garage door and sensor into a single template. The documentation of cover template says the value template only recognizes true/false, open/close sensor status. However, my sensor status spits out “on” for an opened door and “off” for a closed door. Howe can go about fixing this.
cover:
- platform: template
covers:
garage_door:
friendly_name: "Garage Door"
value_template: "{{ states('binary_sensor.garage_door_sensor') }}"
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 states('binary_sensor.garage_door_sensor') == "on" %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}