Play Spotify playlist but random song order

I can play playlist from Spotify from hass, but how can i start playing a playlist with songs in random order. At the moment when i start a playlist is is the same order every time.

can be deleted found solution on forum after posting, sorry for spamming

Can you please share how you play a specific playlist?

thanks

@swepeter Hi sorry, needed to fix my own spotify integration first.

This script block does play a specific playlist and set it to play shuffle

spotify_scene_on_repeat:
  alias: "Spotify - On Repeat"
  sequence:
    - service: media_player.play_media
      data:
        entity_id: media_player.spotify_user_name
        media_content_type: "playlist"
        media_content_id: "spotify:user:1111111111:playlist:kjhgetkjhg45jhkg564564645"
    - service: media_player.shuffle_set
      data:
        entity_id: media_player.spotify_user_name
        shuffle: true

Hope that helps

where did you find the solution. I also need a solution it starts the playlist every time with the same song. (even i have added shuffle: true, it also doesn’t matter at what point in the script i set it to true it will always start with the same song)

The important thing is to start shuffle after the playlist started, not sure where I found this solution, maybe be trying it out myself.

Hi Skycryer,

That i do, and this shuffles the music. But the first song will always be the same one.

This saved my life - I love this community :slight_smile:
By the way: The 1st song is NOT always the same for me with this solution…

I answer on this old topic to share my solution.
I also had the issue that the playlist was always started by the same sing. I just added a Wait of 1s and then it works.
Hope this helps someone.