This is probably user error but I have been staring at this far too long at this point and just can’t see what I am doing wrong.
I have a media_player (picoreplayer running on a Pi 3B+). I can successfully play Spotify playlists in order. Now I am trying to implement shuffle but can’t get it working:
In your second example you set shuffle for lounge, but then play media on livingroom. Also did you check that it plays music in the first place? I don’t think you can play spotify music on any media player, only on the spotify media player. Also the shuffle command needs to be executed after you play a list, not before you play it. And you need to change the media_content_type to playlist to play playlists, as described here.
Hi, your formatting is correct, but spotify seems to turn off Shuffle as soon as you start a playlist. This is how I got it working:
#
# Plays a specific playlist on Spotify.
# To get the shuffle to work, you need to
# 1) Start the playlist (as starting a playlist will disable shuffle)
# 2) Enable shuffle
# 3) Choose next song, as otherwise you will first always have to listen to the 1st song in the playlist
#
spotify_play_playlist:
alias: Spotify Play
description: 'Play playlist in Spotify'
sequence:
- service: media_player.select_source
data:
entity_id: media_player.spotify_living_room
source: 'Moode Spotify'
- service: media_player.play_media
data:
entity_id: media_player.spotify_living_room
media_content_type: playlist
media_content_id: 'spotify:playlist:41FRrXCDu3hoZxNCGhXrCP'
- service: media_player.shuffle_set
data:
entity_id: media_player.spotify_living_room
shuffle: true
- service: media_player.media_next_track
data:
entity_id: media_player.spotify_living_room
@Burningstone, I did originally use playlist but then read somewhere (I’ll be honest I can’t remember where now) that it should now instead be music. I have a vague memory that it didn’t work for me using playlist but did when I switched to using music. The lounge/living_room issue was just a copy paste error in my example.
I am a noob at this sort of stuff. Can shuffle.set be used to play (shuffle) the mp3 tracks in an album on local shared media? I haven’t found a way to play the contents of an album or a folder on local media.
TIA
Is this still working for you? I’m trying to repurpose this for my needs and I’m getting an error that my google nest mini nor the spotify service doesn’t support shuffle? Is my syntax wrong or is that really a basic feature not available on my device? Just trying to understand if I’m asking the right place to “shuffle”.