Hi,
I have a button card on which the icon is changed when the state of a door sensor changes. The sensor state can be on or off.
mailbox_one_template:
value_template: "{{ is_state('binary_sensor.neo_door_sensor_mailbox_sensor','on') }}"
icon_template: "mdi:garage{{ '-open' if is_state('binary_sensor.neo_door_sensor_mailbox_sensor','on') else '' }}"
But I want the icon to stay when the state goes to ‘on’ as long as i don’t press the button. When i press the button the state has to go to off.
What is the best approach for this?