Sonos "Play Text and Restore" with Spotify stops playback and doesn't come back

C8 Pro on platform 2.5.1.183, built-in Sonos integration, "Sonos Player" driver. Posting this because the existing threads describe a milder failure than what I actually got, and I want the measurement on record.

What I wanted

Door-open announcements on my Sonos units, with whatever's playing ducking out of the way and then resuming. Ordinary stuff.

The test

Great Room unit, a Playbar, playing Spotify. I captured its state mid-song, ran Play Text And Restore with the text "Front Door Open" at volume 30, waited, then forced a hub Refresh and read the state again.

Before After
status playing stopped
volume 20 30
track Buck's Run, Buddy Greene (Spotify) the TTS mp3, still loaded

Three separate failures in one command. Playback didn't resume, the volume stayed where the announcement put it, and the announcement file was left sitting as the current track. The forced refresh several seconds later returned the same thing, so this isn't a state-reporting lag.

How that compares to what's already been reported

The existing threads say Sonos Radio works correctly, ducking and announcing and returning at the original volume, while Spotify reverts to the beginning of the first song in the queue. Another thread concludes playTextAndRestore doesn't reliably resume at all and recommends a manual set-track workaround, which requires knowing the stream URL in advance and therefore only works if you always resume the same content.

What I got on Spotify is a step past "reverts to the first song." It simply stops.

Hubitat's own Sonos documentation covers the Speak command, the Notifications app and Rule Machine door triggers, and says nothing about post-announcement behavior either way.

Why this matters if you're planning announcements

Wired across several speakers with a contact sensor trigger, this becomes a music-off switch. Every door opening would stop playback everywhere and leave the volume at the announcement level. Test it against your own audio source before you build rules on it.

I see several other issues reported several years back with no follow-up. Has anyone solved this issue?

You may want to take a look at the Sonos Advanced Controller community integration by Daniel Winks (danielwinks). I moved to it from the built-in Hubitat Sonos integration, and it provides quite a bit more control over how Sonos handles TTS and playback.

I can’t say for certain that it will resolve the specific Spotify restore issue you’re seeing, but it may be worth testing. It has additional TTS and playback controls that aren’t available with the standard Sonos Player driver.

You can install it through Hubitat Package Manager (HPM) by searching for Sonos Advanced Controller. The release thread is also here: https://community.hubitat.com/t/release-sonos-advanced-controller/128383

It might be worth testing with your setup to see if it handles the Spotify playback and restore behaviour any differently.

Cheers,
David