snhnic
(Snhnic)
March 5, 2021, 9:51am
1
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
Dixey
March 5, 2021, 10:02am
3
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 ?
snhnic
(Snhnic)
March 5, 2021, 10:56am
6
anon43302295:
delay after the script
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
Hellis81
(Hellis81)
March 5, 2021, 11:00am
7
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.