Hello,
I have a switch template and I would like to change the status value for the output.
Instead of ON/OFF I would like to have COME/LEAVE displayed. I managed to change the icon, but I can’t change the state object. Does anyone have an idea?
Is it also possible to change the label name by ON or OFF?
switch:
## Come/Leave Funktion
- platform: template
switches:
come_leavefunktion:
value_template: "{{ is_state('sensor.come_leave_function', '1') }}"
friendly_name: "Come/Leave Funktion"
turn_on:
service: knx.send
data:
type: decimal_factor
address: 10/0/1
payload: 0
turn_off:
service: knx.send
data:
type: decimal_factor
address: 10/0/1
payload: 1
icon_template: >-
{% if is_state('sensor.come_leave_function', '0') %}
mdi:home-account
{% else %}
mdi:home-export-outline
{% endif %}