How to fire an Automation based on a Sonos state?

Hoping someone can point me in the right direction. I need/want to create an automation every time my Sonos Speaker is paused (there is no stop command). I’m using the automation editor and I can choose the entity as a trigger but I don’t see a state that would apply for identifying if something is playing or the device is paused? Any help??

Thanks in advance!

The state of a media_player entity (not an attribute) is what you actually want. Looks like it should be idle playing or paused for sonos: see https://github.com/home-assistant/core/blob/5f72ad8da682ad33a3274eff1b39b8a1508791e6/homeassistant/components/sonos/media_player.py#L34

1 Like