I want to create a switch which sets a variable to a certain state (Alarm mode to on).
The Probem is that the switch i am trying to use wont stay on.
Here is my config:
- platform: template
switches:
arm_alarm:
value_template: '{{ states.switch.arm_alarm.state }}'
turn_on:
service: switch.turn_on
entity_id: switch.arm_alarm
turn_off:
service: switch.turn_off
entity_id: switch.arm_alarm
How can i accompish this?