This has been driving me mad for a week now and I finally got around to analysing it. However, I can’t locate the break. This was working perfectly prior to updating to 0.113. Here’s what’s configured:
Automation to play a recorded mp3 of me saying ‘Hey Google, good night’, from one of my smart speakers to my other.
- alias: 'Activate Google Home Routine - Goodnight'
initial_state: 'on'
trigger:
platform: event
event_type: deconz_event
event_data:
id: master_bedroom_dimmer_switch
event: 4001
action:
- service: media_player.volume_set
data:
entity_id: media_player.christina_s_clock
volume_level: 0.7
- service: media_player.play_media
data_template:
entity_id: media_player.christina_s_clock
media_content_id: http://192.168.1.106:8123/local/goodnight.mp3
media_content_type: audio/mp3
- service: script.turn_on
entity_id: script.goodnight_routine
This then uses the Google Assistant routine off my smart speaker to play a Spotify playlist called ‘Sleep’. Then it passes onto the script.goodnight_routine:
goodnight_routine:
alias: Goodnight Routine
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.bed_occupied
- service: switch.turn_on
entity_id: switch.string_lights_switch
- service: scene.turn_on
entity_id: scene.master_bedroom_nightlight
- service: script.lounge_off
- service: media_player.turn_off
entity_id: media_player.lounge_android_tv
- service: homeassistant.turn_off
entity_id: group.veranda, switch.garage_lights, group.kitchen, group.study, light.laundry_light, light.hall_light, light.master_bedroom_light, input_boolean.kitchen_lights_turned_on_manually
- wait_template: "{{ is_state('media_player.bedroom_group', 'playing') }}"
timeout: '00:00:45'
continue_on_timeout: true
- service: light.turn_on
entity_id: light.christina_s_lamp
data:
effect: Sunset
- service: light.turn_on
entity_id: light.angelo_s_lamp
data:
effect: Sunset
- service: script.led_strip_sunset
- delay: '00:15:00'
- service: media_player.turn_off
entity_id: media_player.bedroom_group, media_player.angelo_s_clock, media_player.christina_s_clock
- service: switch.turn_off
entity_id: switch.electric_blanket_switch
- service: homeassistant.turn_off
entity_id: group.bedroom
This should then activate the wait_template to continue on with activating my lighting routines, and then after 15 minutes, turn off my electric blanket, music and lights.
I’m getting as far as
- delay: '00:15:00'
…but then nothing else happens. This leaves my electric blanket on and music to continue playing, when they should turn off after 15 minutes. Logs also don’t show any foul play.
Any ideas, guys?