From e045a814c843f588cfd2692c68763779d414476c Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 28 Sep 2020 20:00:11 -0400 Subject: [PATCH] Adding wait template to ensure announcements dont cut off audio --- config/packages/events.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/packages/events.yaml b/config/packages/events.yaml index ef6f5be..40a3e93 100755 --- a/config/packages/events.yaml +++ b/config/packages/events.yaml @@ -184,6 +184,7 @@ automation: condition: template value_template: '{{ states.calendar.skylar_school.state == "Off" }}' action: + - wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}" - service: script.ah_report data: call_interuption: 1 @@ -202,6 +203,7 @@ automation: entity_id: input_boolean.blackout_time state: 'on' action: + - wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}" - service: script.ah_report data: call_interuption: 1 @@ -236,7 +238,7 @@ automation: condition: condition: state entity_id: input_boolean.school_is_digital - state: 'off' + state: 'on' action: - service: scene.turn_on entity_id: scene.skylar_desk_off