Spotify - playlists and song shuffle

Good day guys, I have a question about Spotify.

I have the Premium account, to integrate it I used the instructions from here and I’m using the mini-media-player for the front end.

Everything is working great but I have a couple of issues:

  • I was able to add the Spotify’s “made for everybody” playlists as you can see from the picture, but I’m not able to use any of my own. I’m able to add them to the card but nothing happens when clicking it. I’m including my configuration below…
  • Also, how I can shuffle the playlists, always plays the songs in the same order?

Thanks a lot…

artwork: cover
entity: media_player.spotify_home
info: scroll
mute: true
name: Spotify
    - id: 'spotify:user:spotify:playlist:37i9dQZF1DDh2iAwVX'
      name: Hits Alegres
      type: playlist
    - id: 'spotify:user:spotify:playlist:37i9dQZFXd97tdziuQ'
      name: Hits Acusticos
      type: playlist
    - id: 'spotify:user:spotify:playlist:37i9ZF1DXmIq8ziEt6'
      name: Esenciales
      type: playlist
    - id: 'spotify:user:spotify:playlist:37i9dF1DX4SsGT1Sbe'
      name: All Out 80s
      type: playlist
    - id: 'spotify:user:spotify:playlist:37i9dF1DXxeAdrVG2l'
      name: All Out 90s
      type: playlist
    - id: 'spotify:user:spotify:playlist:37i9dQZF14o1oSJRJd'
      name: All Out 00s
      type: playlist
    - id: 'spotify:user:spotify:playlist:37iQZF1DwnEm1IYyoj'
      name: Soft Pop Hits
      type: playlist
    - id: 'spotify:user:spotify:playlist:37i9dF1DWqgorJj26U'
      name: Rock Classics
      type: playlist
    - id: 'spotify:user:spotify:playlist:37i9dF1DWcZZjUUEly'
      name: Spanish Roadtrip
      type: playlist
  columns: 3
shuffle: true
source: icon

Bumping a 4 year old question - just to ask if you were able to figure out how to shuffle songs within a given playlist?

Shuffle would be a nice feature! Really miss that option

Off-topic: Songs About Jane, great album :heart_eyes:

BTW, you can use a Spotify downloader mac or windows to get your Spotify playlist in VLC. Then you’ll be able to shuffle play them all I guess.

Working on my first project and was looking for shuffle and auto start an idle chromecast device. I found out that its possible to do Shuffle and random song. I also installed spotcast.

I did this with: mini-media-player

You can add a shortcut:

type: 'custom:mini-media-player'
  columns: 4
    - name: Top 2000
      type: service
      id: spotcast.start
        entity_id: media_player.woonkamer_nest
        uri: 'spotify:playlist:1DTzz7Nh2rJBnyFbjsH1Mh'
        shuffle: true
        random_song: true
artwork: cover
name: Woonkamer Nest
entity: media_player.woonkamer_nest

1 Like

Hi all,

Trying to achieve this, but through an automation as I’ve got a smart button I want to press to turn on the music with a random track from a playlist.

Have tried to do it as two actions to play the playlist and then shuffle like this, but it just plays the same track every time:

Any tips/ideas here?

I had to do a work around using node red to get this accomplished. I basically set it to mute my audio device, play the playlist, set Spotify to shuffle, pause, unmute the device, then skip to the next song.
It’s a lot just to get a playlist to play shuffled, but it works for now lol.

Heh, deary me - this integration really needs rebuilt - I think a Spotify playlist that can’t shuffle properly really isn’t that useful!

Maybe you should use spotcast and spotify-card instead.

I actually did some more playing around with this myself the other day.
Set Node red to set the source I want via the Spotify media player Home assistant integration. Once the source is set, it uses the same integration to set shuffle. When I tell it to play the playlist after that it’s random like it should be.
I can share the node red flow with you if you want.

I’d love to see the flow if you are abled to share it. Thanks.

I’m using script for play playlist:

  alias: playlist_fm84
  - service: media_player.select_source
      source: Yamaha
      entity_id: media_player.spotify
  - service: media_player.shuffle_set
      shuffle: true
      entity_id: media_player.spotify
  - service: media_player.play_media
      media_content_type: playlist
      enqueue: play
      entity_id: media_player.spotify
  mode: single

I haven’t used this in a while because the web api for spotify was 100% garbage for “shuffle”. I’m curious if anyone using it recently has experience with it being any better.

What I mean by garbage is that I have a playlist of 50+ hours of music and on “shuffle” I’d hear the same tracks EVERY time and they are from the first 50ish songs of the playlist.