Hello,
Please could I ask for some assistance?
I have the following script code to shuffle songs in a Spotify or Media Playlist:
'1582294744152':
alias: Boyd Funk Everywhere
sequence:
- entity_id: media_player.kitchen,media_player.tv_room,media_player.master_bedroom
service: sonos.unjoin
- data:
master: media_player.tv_room
entity_id: media_player.kitchen,media_player.master_bedroom
service: sonos.join
- delay: '2'
- data:
volume_level: 0.4
entity_id: media_player.kitchen,media_player.tv_room,media_player.master_bedroom
service: media_player.volume_set
- data:
shuffle: true
entity_id: media_player.master_bedroom
service: media_player.shuffle_set
- delay: '2'
- data:
source: Boyd Funk
entity_id: media_player.tv_room
service: media_player.select_source
It works but only occasionally. Often it starts playing tracks from A onwards. I added in some delays in case Sonos was taking time to handle the joining of players and missed the shuffle command but I don’t think it’s made any difference.
I’m wondering if the code I’ve put together is not the most optimal. I welcome any advice you may have.
Many thanks