Sonos play spotify playlist

Hi

Im trying to get a Sonos speaker to play music from Spotify and play a specific playlist.
Im useing this code:

{

“entity_id”: “media_player.familjerum”,
“media_content_type”: “playlist”,
“media_content_id”: “spotify:user:spotify:playlist:3dsadadasdsaObNe8z”
}

When choseing the Sonos speaker, nothing happends. If i choose my computer that have a Spotify client open it will start playing the music.

Any ide how to fix this?

1 Like

Spotify -> Sonos is explicitly listed as “not supported” in the docs: https://www.home-assistant.io/components/spotify/

A while back i created picture cards of the playlist. then used action to trigger the service to select the source. i’ve changed setup since, but have a look at https://github.com/kalkih/mini-media-player

Then check the source list, and you should be able to trigger that (from memory source list was a radio station, TV, and then a bunch of my playlists from spotify)
not complete info but HTH!

There isn’t a full solution for perfect harmony with hass/sonos/spotify. You can only use Sonos to call Spotify. Mark your playlist as a favorite in Sonos app, then play the favorite. I don’t believe you can play specific songs. This works for anything, not just spotify.

service : media_player.select_source

entity_id: media_player.office
source: "z2 Christmas Hits"

An old thread about it is also here https://community.home-assistant.io/t/help-with-playing-sonos-favorite-media-player-select-source/163526/11

EDIT: I haven’t looked at this project in awhile but it looks like it’s still up and running and has mention of Spotify support.