Playing a door chime kills spotify, can I restart spotify where it was?

Hey Everyone. I have an automation that plays an mp3 door chime when the front door opens. basically says, when the door opens, play this local MP3. works great.

The issue is when I’m listening to music. If kills the spotify playlist.

I have Added smarts to check and see if it’s playing, and not chime, but what I’d really like, is to play the chime and resume my spotify where it was.

I figured out my own issue, so I’m posting here for others.

If I check the state of the media player first, and see if it is “playing”, then I can call spotcast for the entity with just {"force_playback": true}, and it will restart the spotify playlist from the same place.

3 Likes

Hi, Do u have a work around with the current spot cast issue?

Nothing elegant. I’ve tabled this for a bit, working on other things. It also turned out difficult to get the music playing when my wife uses her account to start spotify. Then the SpotCast call started it back with mine.