Hello. I am asking for some assistance here because I just can’t figure out why one of these radio alarm scripts works and the other doesn’t. I have two automations which are almost identical. Each one fires a script and the scripts are almost identical. Yet, one works and the other doesn’t.
Working (Weekday) Automation:
- id: 'Alarm Weekday'
alias: 'Alarm Weekday'
trigger:
- platform: time
at:
- "06:59:00"
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
service: script.turn_on
entity_id: script.radio_alarm_cbcmusic
Working (Weekday) Script:
radio_alarm_cbcmusic:
sequence:
- service: switch.turn_on
data:
entity_id: media_player.radio
- service: squeezebox.call_method
data:
entity_id: media_player.radio
command: stop
- service: media_player.volume_set
data:
entity_id: media_player.radio
volume_level: "0.24"
- service: squeezebox.call_method
data:
entity_id: media_player.radio
command: playlist
parameters:
- play
- >-
http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_vcr
- CBCR2
- 30
Not Working (Weekend) Automation
- id: 'Alarm Weekend'
alias: 'Alarm Weekend'
trigger:
- platform: time
at:
- "08:30:00"
condition:
- condition: time
weekday:
- sat
- sun
action:
service: script.turn_on
entity_id: script.radio_alarm_synphaera
Not Working (Weekend) Script:
radio_alarm_synphaera:
sequence:
- service: switch.turn_on
data:
entity_id: media_player.radio
- service: squeezebox.call_method
data:
entity_id: media_player.radio
command: stop
- service: media_player.volume_set
data:
entity_id: media_player.radio
volume_level: "0.24"
- service: squeezebox.call_method
data:
entity_id: media_player.radio
command: playlist
parameters:
- play
- >-
http://somafm.com/nossl/synphaera256.pls
- Synphaera
- 30
Now, here’s the REALLY weird part! When the weekend alarm occurs, I see it in the logbook, but for some reason it all looks good but then the radio is turned off. This does not occur with the weekday alarm - i.e. the circled log entry does not appear on weekdays.
Note: The 30 as the last parameter of the squeezebox call is a fade-in time. since the radio turns itself off after 7 seconds, no music is ever heard. Again, this works fine with the weekday alarm.
Is anyone able to shed light on this strange issue?
Thanks in advance!