diff --git a/script/voice_notify.yaml b/script/voice_notify.yaml index 64edc0ae..96c943d9 100755 --- a/script/voice_notify.yaml +++ b/script/voice_notify.yaml @@ -32,7 +32,13 @@ voice_notify: - condition: state entity_id: input_boolean.speech_notifications state: 'on' - + - condition: template + value_template: > + {% if is_state('media_player.livingroomCC', 'playing') %} + false + {% else %} + true + {% endif %} - service: switch.turn_on entity_id: switch.living_room_amp - delay: '00:00:05' @@ -48,7 +54,7 @@ voice_notify: {% if now().strftime("%H")|int < 12 %} 0.20 {% elif now().strftime("%H")|int < 18 %} - 0.40 + 0.45 {% else %} 0.25 {% endif %}