I welcome everyone. How to make a general switch to turn on and off several automations at the same time? In the above example, after turning on the switch, it turns itself off, although the automations remain on.
- platform: template
switches:
switch_test1:
value_template: >-
"{{ is_state('automation.auto_test1', 'on') }} and
{{ is_state('automation.auto_test2', 'on') }} and
{{ is_state('automation.auto_test3', 'on') }}"
turn_on:
service: automation.turn_on
data:
entity_id:
- automation.auto_test1
- automation.auto_test2
- automation.auto_test3
turn_off:
- service: automation.turn_off
data:
entity_id:
- automation.auto_test1
- automation.auto_test2
- automation.auto_test3