Multiple actions after trigger

Hi I am trying to get two services to run after home assistant starts bellow is my code
my swi

- alias: home_assistant_started&Alarm
  trigger:
    platform: homeassistant
    event: start
  action:
   - service: homeassistant.turn_on
     entity_id: switch.python
   - service: tts.google_say
     entity_id: media_player.living_room_speaker
     data: 
       message: 'Home Assistant Is Online'  

This is what was working below but i want to have the automation smaller
would prefer google tts to only tiger when witch.python is turned on

- alias: home_assistant_started&Alarm
  trigger:
    platform: homeassistant
    event: start
  action:
   - service: homeassistant.turn_on
     entity_id: switch.python
#   - service: tts.google_say
#     entity_id: media_player.living_room_speaker
#     data: 
#       message: 'Home Assistant Is Online'     

 

# Testing Google 

- alias: Python Script Auto started
  trigger:
    platform: homeassistant
    event: start
  action:
    - service: tts.google_say
      entity_id: media_player.living_room_speaker
      data: 
        message: 'Home Assistant Is Online'

In that case, try:

- alias: home_assistant_started&Alarm
  trigger:
    platform: homeassistant
    event: start
  action:
   - service: homeassistant.turn_on
     entity_id: switch.python
   - delay: '00:00:01'
   - condition: state
     entity_id: switch.python
     state: 'on'
   - service: tts.google_say
     entity_id: media_player.living_room_speaker
     data: 
       message: 'Home Assistant Is Online'

That will wait one second after turning on switch.python, check that it is on, and then only if it is on will it run the TTS action. You can find more about the format of actions in the documentation.

thank you so much I haven’t managed to get this to run correctly though but I thinks its this stupid google home unit seems glitch at the best of times thanks for the help though much appreciated