Problems with timed audio playback on Google Nest

Hi everyone,

I need your help with a Home Assistant automation using a Google Nest speaker.

The automation should automatically turn on the speaker at specific times, play a short text-to-speech (TTS) message, and then play a local audio file. The times are determined by a sensor and change daily – this part works fine.

The problem:

The Google Nest isn’t responding reliably to the triggers. Sometimes it doesn’t start on time, or the audio file doesn’t play at all, even though the automation runs correctly and no YAML errors are displayed.

Does anyone have experience reliably “waking up” Google speakers before audio starts playing?

Or do you know of any workarounds to ensure the speaker is active before playback begins?

I would really appreciate any suggestions!

Thanks!

If desired, I’m also willing to provide compensation for your help.

- alias: Adhan - Fajr
  mode: single
  trigger:
    - platform: time
      at: sensor.fajr_zeit
      
  action:
  
   # 1) Lautsprecher "anstupsen": Lautstärke auf aktuellen Wert setzen (ändert nichts,
   #    weckt aber zuverlässig die Cast-Session) 
    - service: media_player.volume_set
      target:
        entity_id: media_player.googlenest
      data:
        volume_level: "{{ state_attr('media_player.googlenest','volume_level') | default(0.4) }}"

    - delay: "00:00:01"
  
   # 1) Google Nest einschalten
    - service: media_player.turn_on
      target:
        entity_id: media_player.googlenest
   # 2) 2–3 Sekunden warten, bis das Gerät aufgewacht ist
    - delay: "00:00:03" 
    
   # 3) TTS-Kurzansage – weckt den Player sicher
    - service: tts.google_translate_say
      data:
        entity_id: media_player.googlenest
        message: "."   # oder: "Adhan startet" – leeres Zeichen geht auch

   # 4) Kurze Pause nach TTS
    - delay: "00:00:01" 
    
   # 5) Lautstärke setzen (anpassen nach Wunsch)
    - service: media_player.volume_set
      target:
        entity_id: media_player.googlenest
      data:
        volume_level: 0.2  # 0.2 = 20%
        
   # 6) Adhan abspielen
    - service: media_player.play_media
      target:
        entity_id: media_player.googlenest
      data:
        media_content_id: media-source://media_source/local/adhan.mp3
        media_content_type: music

- alias: Adhan - Dhuhr
  trigger:
    - platform: time
      at: sensor.dhuhr_zeit
  action:
  
     # 1) Lautsprecher "anstupsen": Lautstärke auf aktuellen Wert setzen (ändert nichts,
   #    weckt aber zuverlässig die Cast-Session) 
    - service: media_player.volume_set
      target:
        entity_id: media_player.googlenest
      data:
        volume_level: "{{ state_attr('media_player.googlenest','volume_level') | default(0.4) }}"

    - delay: "00:00:01"
    
   # 1) Google Nest einschalten
    - service: media_player.turn_on
      target:
        entity_id: media_player.googlenest
   # 2) 2–3 Sekunden warten, bis das Gerät aufgewacht ist
    - delay: "00:00:03" 
    
   # 3) TTS-Kurzansage – weckt den Player sicher
    - service: tts.google_translate_say
      data:
        entity_id: media_player.googlenest
        message: "."   # oder: "Adhan startet" – leeres Zeichen geht auch

   # 4) Kurze Pause nach TTS
    - delay: "00:00:01" 
    
   # 5) Lautstärke setzen (anpassen nach Wunsch)
    - action: media_player.volume_set
      data:
        entity_id: media_player.googlenest
        volume_level: 0.4 # 0.4 = 40%
        
   # 6) Adhan abspielen
    - action: media_player.play_media
      data:
        entity_id: media_player.googlenest
        media:
          media_content_id: media-source://media_source/local/adhan.mp3
          media_content_type: music
        metadata: {}

- alias: Adhan - Asr
  trigger:
    - platform: time
      at: sensor.asr_zeit
  action:
   # 1) Google Nest einschalten
    - service: media_player.turn_on
      target:
        entity_id: media_player.googlenest
   # 2) 2–3 Sekunden warten, bis das Gerät aufgewacht ist
    - delay: "00:00:03" 
    
   # 3) TTS-Kurzansage – weckt den Player sicher
    - service: tts.google_translate_say
      data:
        entity_id: media_player.googlenest
        message: "."   # oder: "Adhan startet" – leeres Zeichen geht auch

   # 4) Kurze Pause nach TTS
    - delay: "00:00:01" 
    
   # 5) Lautstärke setzen (anpassen nach Wunsch)
    - action: media_player.volume_set
      data:
        entity_id: media_player.googlenest
        volume_level: 0.4 # 0.4 = 40%
        
   # 6) Adhan abspielen
    - service: media_player.play_media
      target:
        entity_id: media_player.googlenest
      data:
        media_content_id: media-source://media_source/local/adhan.mp3
        media_content_type: music

- alias: Adhan - Maghrib
  trigger:
    - platform: time
      at: sensor.maghrib_zeit
  action:
   # 1) Google Nest einschalten
    - service: media_player.turn_on
      target:
        entity_id: media_player.googlenest
   # 2) 2–3 Sekunden warten, bis das Gerät aufgewacht ist
    - delay: "00:00:03" 
    
   # 3) TTS-Kurzansage – weckt den Player sicher
    - service: tts.google_translate_say
      data:
        entity_id: media_player.googlenest
        message: "."   # oder: "Adhan startet" – leeres Zeichen geht auch

   # 4) Kurze Pause nach TTS
    - delay: "00:00:01" 
    
   # 5) Lautstärke setzen (anpassen nach Wunsch)
    - action: media_player.volume_set
      data:
        entity_id: media_player.googlenest
        volume_level: 0.4 # 0.4 = 40%

        
   # 6) Adhan abspielen
    - action: media_player.play_media
      data:
        entity_id: media_player.googlenest
        media:
          media_content_id: media-source://media_source/local/adhan.mp3
          media_content_type: music
        metadata: {}

- alias: Adhan - Isha
  trigger:
    - platform: time
      at: sensor.isha_zeit
  action:
   # 1) Google Nest einschalten
    - service: media_player.turn_on
      target:
        entity_id: media_player.googlenest
   # 2) 2–3 Sekunden warten, bis das Gerät aufgewacht ist
    - delay: "00:00:03" 
    
   # 3) TTS-Kurzansage – weckt den Player sicher
    - service: tts.google_translate_say
      data:
        entity_id: media_player.googlenest
        message: "."   # oder: "Adhan startet" – leeres Zeichen geht auch

   # 4) Kurze Pause nach TTS
    - delay: "00:00:01" 
    
   # 5) Lautstärke setzen (anpassen nach Wunsch)
    - action: media_player.volume_set
      data:
        entity_id: media_player.googlenest
        volume_level: 0.5 # 0.5 = 50%
        
   # 6) Adhan abspielen
    - action: media_player.play_media
      data:
        entity_id: media_player.googlenest
        media:
          media_content_id: media-source://media_source/local/adhan.mp3
          media_content_type: music
        metadata: {}

- alias: Update Diyanet Prayer Times Daily
  description: Holt einmal täglich die Gebetszeiten von der Diyanet-API
  trigger:
    - platform: time
      at: "00:05:00"
  action:
    - service: homeassistant.update_entity
      target:
        entity_id: sensor.diyanet_prayer_times_today
  mode: single

I use Google Chromecast Audio for whole home music and announcements via the Chromecast integration. They’re ok for the most part but sometimes unreliable.

I’ve found that doing a “turn off” then a “turn on” then the announcement greatly improved the reliability. Since these actions don’t wait for the previous one to complete, I add a delay of 300 ms after each action. It slows things down but seems to work

Overall I’m underwhelmed with the Chromecast protocol and the CCAs. It seems like they’re slowly removing functionality every year, e.g. skipping a track.

I’m exploring Futureproofhomes Satellite 1 and Music Assistant as a possible replacement.

Hope this helps. Especially hope someone else comes in with a better solution!

1 Like