Google Home - Resume Audio after Text to Speech

It seems like if i have audio playing on the Google Home and then I make an announcement on it using Hubitat that after the announcement the audio does not resume. Is there a way around this or do i have to save the state of the device in a variable before making my announcement then set the state to the variable after?

Using the native Chromecast integration this is not possible because it uses the same method for TTS that apps use to play music, the "cast" function. If you want this functionality you have to look at User device/apps like Google Assistant Relay or Cast-Web-API.

So is it not possible to capture the state of the Google Home first and save that to a variable? As in it was playing and the source it was playing form? I would guess not sadly but was just hoping..

The State of the google home? What do you mean by "the state"? You can cast media to the Google Home using the Cast function but you cannot control media. For example, if you had requested Pandora to play music by your voice on the Google Home, there is no way for Hubitat to be able to capture that that is what is going on or request that after the TTS announcement. It just doesn't work that way.

Okay yeah was hoping there would be a something like that URL and position in the stream and store it. then you could put that back in after.. crappy! thanks for the help!

That's not exposed to the Cast function. The cast function is implemented across all google devices, Google home, Chromecast, Chromecast Audio, Nest Hub...everything. It assumes that when you cast content to the device, that you want the content to play, since you are doing it manually, and that you do not want the other content anymore. That's because this function is not used for TTS normally, it's used to play music or video on your device.

1 Like