Spotify playlist with smart button

Hi all,

Now then, I’d be incredibly grateful if someone could provide some code so when pressing a smart
button a specific playlist from Spotify plays on shuffle. Ideally I could specify a number of playlists and the button would play one at random.

I’ve tried to generate my own code but constantly got numerous errors and deleted it.

I appreciate this is a bit cheeky as people don’t just gain time, experience and expertise for nothing!

If it helps, my media player is Sonos. I appreciate I’d have to fill in device info myself to complete the code.

Hi,

Did you check this forum on this topic?!
You need a firestarter that can talk to spotify. In the past I used spotcast for that.
Now I use the integration Spotify Plus.

With this integration you can use it's service to fire for example a playlist on shuffle.

action: spotifyplus.player_media_play_context
metadata: {}
data:
  context_uri: spotify:playlist:xxxxxxxxxxxxxxx
  entity_id: media_player.spotifyplus
  device_id: YOUR_MEDIA_PLAYER
enabled: true