Have a look at this automation where I have 4 different sequences running in parallel.
Parallel automation example.
###############################################################################
## Light - Adaptive Lighting Sleep Mode
###############################################################################
- id: light_adaptive_lighting_sleep_mode
alias: "[Light] Adaptive Lighting Sleep Mode"
description: "Turn on sleep mode lighting."
trigger:
- platform: state
entity_id: input_select.occupancy_mode
to: Night
- platform: state
entity_id: input_select.occupancy_mode
from: Night
condition:
- condition: state
entity_id: switch.adaptive_lighting
state: "on"
- condition: state
entity_id:
- input_boolean.occupancy_override
- input_boolean.alarm_triggered
state: "off"
action:
- if:
- condition: state
entity_id: input_select.occupancy_mode
state: Night
then:
- parallel:
- sequence:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_sleep_mode_main_lights
- sequence:
- wait_template: "{{ is_state('light.bathroom_vanity_rgb_light','off') }}"
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_sleep_mode_bathroom_lights
- sequence:
- wait_template: "{{ is_state('light.dining_room_rgb_light','off') }}"
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_sleep_mode_rgb_lights
- sequence:
- wait_template: >
{{ is_state('light.bedroom_fan_light','off')
and is_state('light.bedroom_potlights','off') }}
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_sleep_mode_bedroom_lights
else:
- service: switch.turn_off
target:
entity_id:
- switch.adaptive_lighting_sleep_mode_bedroom_lights
- switch.adaptive_lighting_sleep_mode_main_lights
- switch.adaptive_lighting_sleep_mode_rgb_lights
- switch.adaptive_lighting_sleep_mode_bathroom_lights