Hi
I have the following script which is working ok.
play_music:
alias: 'Play Music'
sequence:
- service: remote.send_command
data:
entity_id: remote.living_room_ac_remote
command: b64:"JgBmAJOVExMRFBE5EzcTEhI4ExMRFBEUERQSOBM3ExMRORITERQSFBE4EzcTOBI4EhMRFBITEjgTExEUERQSExI4EzcTNxMABfSWkhI4EgAMU5aSEzcTAAxTlpESORIADFOXkRM3EgANBQAA"
- delay: '00:00:08'
- service: spotcast.start
data:
entity_id: media_player.bose
uri: 'spotify:playlist:37i9dQZF1DXa1BeMIGX5Du'
I would like to choose randomly the playlist from 3 selections. I tried the following but it is not working.
Which is the correct syntax?
play_music:
alias: 'Play Music'
sequence:
- service: remote.send_command
data:
entity_id: remote.living_room_ac_remote
command: b64:"JgBmAJOVExMRFBE5EzcTEhI4ExMRFBEUERQSOBM3ExMRORITERQSFBE4EzcTOBI4EhMRFBITEjgTExEUERQSExI4EzcTNxMABfSWkhI4EgAMU5aSEzcTAAxTlpESORIADFOXkRM3EgANBQAA"
- delay: '00:00:08'
- service: spotcast.start
data:
entity_id: media_player.bose
data_template: >
{{ ["uri: 'spotify:playlist:37i9dQZF1DXa1BeMIGX5Du'", "uri: 'spotify:playlist:37i9dQZF1DWZeKCadgRdKQ'", "uri: 'spotify:playlist:37i9dQZF1DX3rxVfibe1L0'"] | random}}