If I want to play more then one announcement the announcements are cut because the script is running on. Any idea how to wait because announce: true do not change the play state? How can I calculate the delay time if I want to play a sound and then a tts?
As of right now itās not possible to determine when a specific alert has finished playing. If you need to play multiple announcements in succession, youāll probably need to rely on delays between service calls for now.
As a hack you can move the announcement part of the automation to a script and make the script mode queued, then call the script from the automation. You might also want to make this as a parallel call in your automation so it doesnāt make other actions wait. It might be ugly but should work.
Just wanted to say thank you for this wonderful scriptā Iām using it on al daily basis for almost everything that could be announced per voice message. Keep up the good work
Unable to find referenced devices media_player.dining_room or it is/they are currently not available
Unable to find referenced devices media_player.bedroom or it is/they are currently not available
Iām litterally just changing your device id with media_player.dining_room (and to test, also .bedroom)
If I try with a media file like an mp3, it works, also working if I use directly the TTS service.
Thank you for this - it works nicely on my Sonos speakers, but one thing:
If I play a long message (Whether typed or the output from an entity), the volume of the speech drops off and the music gets louder again before playback is finished. I understand min_wait fixes that, but 2 things with this:
It also means there is a delay before anything is said (Equal to min_wait I think). So setting it to 8 so a long message can play out means 8 seconds of silence prior to speech starting. Is there any way to avoid this?
Messages of unpredictable length (Like playing the weather summary from the BOM here in Australia) mean we cannot be sure when the volume needs to be āturned upā again.
Is there any way to avoid this? Particularly the first point.
@Talvish Iām actually having the same issue that @vongole83 describes here. Iāve been using your script for close to a year now ā¦ and itās actually always worked well except the last 4-6 weeks where Iām experiencing what vongole83 is.
Iām wondering if maybe the Sonos integration and/or APIs changed, since your script didnāt have these symptoms before? Any ideas?
- sensor:
- name: achterdeur
unique_id: 7e8bb50d-e1e1-462b-8056-04f6baa58b70
icon: mdi:door-open
state: >-
{{ [
"Willen we alstublieft de deur dicht doen?",
"Het is buiten nog te warm!",
"Sluiten",
"De deur dicht, het is te warm buiten",
"Dicht doen!",
"Hoeveel keer moet ik het nog zeggen, doe die deur dicht!"
] | random }}