General switch for automation

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

Not an expert, but perhaps this could work using the new input_button helper and set up an automation triggered by this to do the switching on/off of other automations?

https://www.home-assistant.io/integrations/input_button/

remove the quotes fom around the template.

value_template: >-
           {{ is_state('automation.auto_test1', 'on') }} and
           {{ is_state('automation.auto_test2', 'on') }} and
           {{ is_state('automation.auto_test3', 'on') }}

the “>” symbol denotes a multi-line template. adding quotes to the multi-line template turns the template into a string.

I don’t know if what you are doing will work but at least that will fix the state template.