Adding in condition that looks to see if music is playing.

This commit is contained in:
CCOSTAN 2017-02-09 18:19:22 +00:00
parent 9baa964ac9
commit eac2c5b98d

View File

@ -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 %}