I have a template switch to combine an actor and a door sensor, and I’d like to show “Open” or “Closed” instead of “On” and “Off”. Is this possible within the template? I cannot do it via frontend because I use the entity in Android Auto.
Here’s the current code:
switch:
- platform: template
switches:
garagentor:
friendly_name: "Garagentor"
value_template: "{{ is_state('binary_sensor.offnungskontakt_garagentor_offnung', 'on') }}"
turn_on:
action: switch.toggle
target:
entity_id: switch.fingerbot_garagentor_schalter
turn_off:
action: switch.toggle
target:
entity_id: switch.fingerbot_garagentor_schalter
icon_template: >-
{% if is_state('binary_sensor.offnungskontakt_garagentor_offnung', 'on') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}