Voice Announcements and resume play but only if playing


#1

Hi again,

I’m using a Sonos speaker to make announcements in my home.
I’m using “speak text and resume” which is working perfectly, Sonos makes the announcement and continues playing music.
The problem is that if I stop the music (for example via Alexa) then Sonos is silent but when it makes an announcement the “resume” makes it play the music again!

Is there a way to ask Sonos to resume playing only if it was playing?
Maybe a command I’m not aware of?

Thanks!!!
L.


#2

Im interested in the same thing, but my use case is via Google Home Cast-Web-API – so following along …


#3

I don’t have a sonos system. Does the device handler for sonos report device status, ie. playing, stopped, etc? If it does, then you might be able to query the status before sending the speak or speak text and resume command.


#4

It has to do with capturing the attributes to a local state item. Its not super reliable but works most of the time for me. Import this piston and play with it