Currently, to play a Spotify playlist in a script, I have this configured:
- service: media_player.select_source
data:
entity_id: media_player.spotify
source: Living Room Echo
- service: media_player.volume_set
data:
entity_id: media_player.spotify
volume_level: 0.5
- service: media_player.play_media
data:
entity_id: media_player.spotify
media_content_type: playlist
data_template:
media_content_id: '<content_id_here>'
- service: media_player.shuffle_set
data:
entity_id: media_player.spotify
shuffle: 'true'
This works, but it takes upwards of 10 seconds to start playing the playlist. I think this is because it’s taking a while to make it through all of the actions. Is there a way to combine the actions together? For example, maybe something like this:
- service: media_player.play
data:
entity_id: media_player.spotify
source: Living Room Echo
volume_level: 0.5
media_content_type: playlist
media_content_id: '<content_id_here>'
shuffle: 'true'
I thought I might be able to do this in a scene, but I can’t get anything to work and I can’t seem to find any examples. Does anyone have any ideas?
Thanks!