Fisrt sound and then the announce

I want to play a dingdong and then lets Google say that the button has pushed.

I can get either the ding dong sound (mp3) or teh announce. What am I missing?

alias: Ring doorbell is pushed
description: ‘’
trigger:

  • platform: state
    entity_id: binary_sensor.gate_door_ding
    from: ‘off’
    to: ‘on’
    condition: []
    action:
  • service: script.1614934873403
  • service: media_player.volume_set
    entity_id: media_player.speakers
    data:
    volume_level: ‘0.5’
  • service: tts.google_translate_say
    entity_id: media_player.speakers
    data:
    message: Doorbell has been pushed
    mode: single

Presumably the ‘bing bong’ is in the script? If so just add a delay after the script and before the volume set for the duration of the audio file.

1 Like

Try putting a 1 or 2 second delay after the volume_set.

Edit: Never mind. Someone beat me to it.

1 Like

Doesn’t it need the mp3 to be available on a location with https ?

Yes but it is.

Guys,

Thanks this works!

alias: Ring doorbell is pushed
description: ‘’
trigger:

  • platform: state
    entity_id: binary_sensor.gate_door_ding
    from: ‘off’
    to: ‘on’
    condition:
    action:
  • service: script.1614935679079
  • delay: 00:00:04
  • service: media_player.volume_set
    entity_id: media_player.speakers
    data:
    volume_level: ‘0.5’
  • service: tts.google_translate_say
    entity_id: media_player.speakers
    data:
    message: Doorbell has been pushed
    mode: single
1 Like

What I usually do is delay 2 seconds then wait until media player is idle then do the TTS.

It’s also very useful if you TTS two things after each other.
The fixed delay is hard to maintain, but delay 2 seconds then wait until always work since HA needs two seconds to notice the first TTS or mp3 being played.