One switch multi automation's on or off

Need help how to make one switch to on or off more automation’s. I try something but is not working.
I now I can put automation in overview in group and set Show Header Toggle. Butt I wont just one switch to start or off more then one automation.

switch:
  - platform: template
    name: Living room alarm
    switches:
        turn_on:
          - service: automation.turn_on
            target:
              entity_id: automation.alarm_door_livingroom
              entity_id: automation.alarm_pir_livingroom
        turn_off:
          - service: automation.turn_off
            target:
              entity_id: automation.alarm_door_livingroom
             entity_id: automation.alarm_pir_livingroom

Your indentation is incorrect for the last entity id, and if you have more than one you need to list them with -

switch:
  - platform: template
    name: Living room alarm
    switches:
        turn_on:
          - service: automation.turn_on
            target:
              - entity_id: automation.alarm_door_livingroom
              - entity_id: automation.alarm_pir_livingroom
        turn_off:
          - service: automation.turn_off
            target:
              - entity_id: automation.alarm_door_livingroom
              - entity_id: automation.alarm_pir_livingroom

now when go check configuration get:
Invalid config for [switch.template]: [name] is an invalid option for [switch.template]. Check: switch.template->name. (See ?, line ?).

Look at the available configuration options for a template switch and you should see the mistake pretty quickly:

ok I add friendly_name

switch:
  - platform: template
    switches:
        friendly_name: "lra"
        turn_on:
          - service: automation.turn_on
            target:
              - entity_id: automation.alarm_door_livingroom
              - entity_id: automation.alarm_pir_livingroom
        turn_off:
          - service: automation.turn_off
            target:
              - entity_id: automation.alarm_door_livingroom
              - entity_id: automation.alarm_pir_livingroom

and get this…
Invalid config for [switch.template]: expected dictionary for dictionary value @ data[‘switches’][‘friendly_name’]. Got ‘lra’
expected dictionary for dictionary value @ data[‘switches’][‘turn_off’]. Got [OrderedDict([(‘service’, ‘automation.turn_off’), (‘target’, [OrderedDict([(‘entity_id’, ‘automation.alarm_door_livingroom’)]), OrderedDict([(‘entity_id’, ‘automation.alarm_pir_livingroom’)])])])]
expected dictionary for dictionary value @ data[‘switches’][‘turn_on’]. Got [OrderedDict([(‘service’, ‘automation.turn_on’), (‘target’, [OrderedDict([(‘entity_id’, ‘automation.alarm_door_livingroom’)]), OrderedDict([(‘entity_id’, ‘automation.alarm_pir_livingroom’)])])])]. (See ?, line ?).

Look at the examples in the documentation.

Or you could define an input_boolean and make that a condition in your automations.

This is how I did it.
I could never get it to work with 2 entity_id as how you did. My assumption is the automation.turn_XX can only handle one. Calling the service for each automation, it works. I currently have 7 automations switching on and off this way.

switch:
  - platform: template
    switches:
        friendly_name: "lra"
        turn_on:
          - service: automation.turn_on
            target:
              - entity_id: automation.alarm_door_livingroom
          - service: automation.turn_on
            target:
              - entity_id: automation.alarm_pir_livingroom
        turn_off:
          - service: automation.turn_off
            target:
              - entity_id: automation.alarm_door_livingroom
          - service: automation.turn_off
            target:
              - entity_id: automation.alarm_pir_livingroom