Hello,
I try to create a skript for SONOS media_player which startet a media_extractor stream and if the stream ends it should start a playlist.
But I don’t know how to start the playlist after the stream ends.
I try it with a “wait for trigger” but then always the playlist starts, also if I stop any music…
Anybody an idea how to solve the problem?
Here is my script:
alias: sonos_morgens
sequence:
- service: media_player.volume_set
data:
volume_level: 0.07
entity_id: media_player.bad
- service: media_extractor.play_media
data:
media_content_id: 'http://www.tagesschau.de/100sekunden/index.html'
media_content_type: music
entity_id: media_player.bad
# - wait_for_trigger:
# - platform: state
# entity_id: media_player.bad
# from: playing
# to: paused
- service: media_player.shuffle_set
data:
shuffle: true
entity_id: media_player.bad
- delay: '2'
- service: media_player.select_source
data:
source: Lieder
entity_id: media_player.bad
mode: single
1 post - 1 participant