Hi there, first of all thanks for the awesome script but sadly it stopped working for me and i get the same error as @rudy12767 , so “Google Home Resume: Error executing script. Error rendering template for variables at pos 7: ValueError: dictionary update sequence element #0 has length 1; 2 is required”
If you have just one Spotify account integrated, it doesn’t matter what you put there, it will automatically use the primary (and only) Spotcast account
Hmm. Then I’ve done something wrong. Because when I’ve got Spotify playing and an automation runs to announce an event, it doesn’t resume spotify when it’s done announcing. What would I need to provide you to help me troubleshoot this?
Okay, I opened an issue. It wouldn’t let me upload the JSON for whatever reason, so I put it on that pastebin type site and linked it. Thank you, I very much appreciate your time! Sending you Ko-fi now!
I finally got the script working. Don’t ask me how, but since I used the Text-to-Speech (TTS): Say an TTS message with google_translate istead of the cloud_say service in my automations it works.
Big thank you @TheFes!
I think I have a bug or a feature request.
Gotta paint a picture real quick. I have two speaker groups, group A ( speaker 1,2) group B (speaker 1,2,3,4) Each number represents a speaker. They have been added to the script.
I have music(Spotify) playing on group A (just two speakers). Now a tts message goes off on group B with four speakers that includes the two speakers from group A . The message plays and music is resumed.
The issue, simply stated, is that the two speakers that are not playing music (but are playing the tts message) don’t restore their previous volume.
With the announce_volume variable set to .7 the speakers 3 and 4 have a volume increase after the message plays if at .5 before the message they jump to .69. If announce_volume is set to .4 i get a volume decrease from .5 to .34.
My B if I am just missing something and incorrectly using the script/automation. Appreciate your work a ton thank you!!
Hello,
I followed the described procedure; I have installed both the script and the automation…I made changes in the config files so they can match my configuration. But unfortunately, it doesn’t work.
I am relatively new to home assistant, so I am not excluding to have made some mistakes in the config.
Anyway, I am using node red to create flows in which google devices play vocal messages when a condition is met. After that, it does not resume its previous state.
My first question is, if this script and automation works with node red integration.
The second thing is how I can eventually trace the problem, so I can understand if there is a config problem or whatever else?
This is the situation:
If I go in the setting->automations I can find “00 - Google Home Automatic Resume”, so it was triggered.
Following what it is written in the first post, I went in script and both “00 - Google Home Resume” and the helper version, never triggered. If I made a trace, it is written “no trace found”.
On the contrary If I made trace in the automation setting, I found the error “UndefinedError: cast_entities’ is undefined”.
I have a google nest device, plus a couple of google home devices, but they aren’t connected as a group.
In your default configuration I see :
speaker_groups:
media_player.huis_groep:
- media_player.keuken_hub
- media_player.slaapkamer_hub
- media_player.pepijn_mini
- media_player.woonkamer_mini
- media_player.zolder_mini_marleen
- media_player.zolder_mini_martijn
- media_player.floris_mini
media_player.boven_groep:
- media_player.pepijn_mini
- media_player.slaapkamer_hub
- media_player.zolder_mini_marleen
- media_player.zolder_mini_martijn
- media_player.floris_mini
media_player.beneden_groep:
- media_player.keuken_hub
- media_player.woonkamer_mini
media_player.zolder_groep:
- media_player.zolder_mini_marleen
- media_player.zolder_mini_martijn
Do I need to delete them all and left only “speaker_groups:”?
If it’s in that list, it doesn’t mean it’s triggered, it just means the automation is created.
It should mention a date and time when it was last triggered, like it does here for me: