Script to resume Google Cast devices after they have been interrupted by any action

Yes, the stuff which has been removed was only added in 2024.11 which were things like how danceable the music is and how many beats per minute.

It should work for all devices within the cast integration

So it only works for Google Cast devices then? I was looking for something that worked for any media player.

Hi @TheFes, first timer here, thanks so much for this script 3 years later! I’ve recently just added this integration and it’s working great - but was having trouble looking thru past comments to figure out this problem.

In the google_home_resume.yaml file where / what do I enter for the secondary Spotcast account user? The 2nd user is already added into the Spotify integration and Spotcast credentials are set, just not entirely sure what to add - something like?

    script.google_home_resume:
      settings: &settings
        primary_spotcast: "my_account" # this is working as expected in the script
        account: "second_account" # this part is not working as expected? Just guessing what to put here

I’ve tried reading through past posts and while there are quite a few references I feel like I may be missing something. Hoping you can point me in the right direction.

You don’t need to add anything for the second account.
The primary account setting is just used to determine when it’s needed to specify an account when resuming Spotify.
You do need to ensure that the accounts are named the same as the Spotify media players

Ah okay copy, thanks for clarifying. Must be something else on my end, will keep tinkering.

What’s the issue with the script?

The issue ended up being entirely unrelated to your script - which was why I was having such a hard time pinpointing through the traces what the issue was.

Long story short, user error on my part configuring things thru HA Companion and GH, all appears to be working now.

Thanks for checking in though - as I said earlier, this is a fantastic script and workaround to the SDK method with the ā€˜incoming broadcast’ message - and for my partner GA appears to ā€˜just work’!

First of all, thanks for the script TheFes, its great! I’ve been using it for a few weeks now.

But I have an issue, I make several announcements throughout the and it is quite slow to start up. I have three google homes, I only make announcements to the Google Home group (all three). I never make announcements on just one speaker.

I think I have the problem you describe here in this post.

Without the script, they would used to all chime at once and then announce pretty quickly. But now they would chime in a random sequence/delay and often the first one will chime again at the end - it is great that they are all waiting to synchronize but the random delay is getting annoying.

Any thoughts on a fix/workaround?

I’m thinking of removing the script until there is a solution.

Thanks

So, sorry, before I go off track—even before I start trying to use this system—can you confirm whether it only works with tts.google_translate_say, or if it also works with the new standard tts.speak, which in my case from Italy would use entity_id: tts.google_it_com?

Apologies, I’m not very experienced with TTS. I’ve been using Home Assistant for a few years, but I’ve never fully understood TTS, mainly because of the annoying issue where music doesn’t resume after a message.

I’d like to start using this method, but first I want to get things straight with all the TTS setups I’ve had lying around for months. Over time, I’ve used several different methods without ever really understanding them fully, so before I drive myself crazy, I’d like to figure out which one is best to use with this system.

Thanks!

You can use it with any TTS service, also with the moder tts.speak action.

1 Like

I was trying to use this again and came across a broken link. I guess it’s just a linking error—it’s working fine on GitHub.
Since I’m not very experienced, I still haven’t figured out whether I’ll need an automation or a script. Even though I read the whole post, I’m not sure what it depends on.
From my side, I can say that the music should always resume after a TTS—probably using tts.speak—and the music to resume will be either Spotify or TuneIn, if that helps.
Thanks a lot!

Now there is always at least one speaker that takes a long time to chime, I guess there is no solution for me and I’ll need to stop using the script as the announcements are almost always delayed now. Thank you in any case.

Does this script still work for Spotify after all those auth changes from Spotify? Just asking because in my setup interrupted Spotify stream does not resume…

1 Like

Not sure, as I don’t use it myself anymore.
I now use the Home Assistant Voice PE throughout my house.
I’ll try to test next week.

2 Likes

How do i use this from ā€œnode redā€. Can someone help me (step by step as im new in this world) with a flow that makes a TTS and resume playback on my google home speeker?

This has been discussed in this topic before, you need to call the script and provide the data for the script in json

Hi @TheFes, thanks for your great great Work man!!

Any Plan to Update the Main Package with Spotify v6 fix?

The stable version still seems to be 4.0.1.
There is a branch on the repo works with Spotcast 5+

Hi, the script doesn’t resume Spotify music after TTS. I have Spotcast v6.0.0-a15 and script 2025.1.0. After running the script, I get the following errors in the logs:

Can you help me?

Rejestrator: homeassistant.components.script.google_home_resume_helper
Źródło: helpers/script.py:2067
integracja: Skrypt (dokumentacja, Problemy)
Pierwsze zdarzenie: 20:20:45 (10 wystąpień)
Ostatnio zalogowany: 20:21:18

  • Google Home Resume - Helper Script: If at step 2: Parallel action at step 1: parallel 1: Resume needed?: Resume playing: Spotify?: Error executing script. Service not found for call_service at pos 2: Action spotcast.transfer_playback not found
  • Google Home Resume - Helper Script: If at step 2: Parallel action at step 1: parallel 1: Resume needed?: Error executing script. Service not found for choose at pos 2: Action spotcast.transfer_playback not found
  • Google Home Resume - Helper Script: If at step 2: Parallel action at step 1: parallel 1: Error executing script. Service not found for if at pos 10: Action spotcast.transfer_playback not found
  • Google Home Resume - Helper Script: If at step 2: Error executing script. Service not found for parallel at pos 1: Action spotcast.transfer_playback not found
  • Google Home Resume - Helper Script: Error executing script. Service not found for if at pos 2: Action spotcast.transfer_playback not found