mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-11-07 09:58:17 +00:00
Check for things Playing and break through alerts.
This commit is contained in:
@@ -19,6 +19,13 @@
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.family
|
entity_id: group.family
|
||||||
state: 'home'
|
state: 'home'
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{% if is_state('media_player.livingroomCC', 'playing') %}
|
||||||
|
false
|
||||||
|
{% else %}
|
||||||
|
true
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: media_player.turn_on
|
- service: media_player.turn_on
|
||||||
|
|||||||
@@ -29,16 +29,21 @@ voice_notify:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.alert_mode
|
entity_id: input_boolean.alert_mode
|
||||||
state: 'on'
|
state: 'on'
|
||||||
|
- condition: or
|
||||||
|
conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{% if is_state('media_player.livingroomCC', 'playing') %}
|
||||||
|
false
|
||||||
|
{% else %}
|
||||||
|
true
|
||||||
|
{% endif %}
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.alert_mode
|
||||||
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.speech_notifications
|
entity_id: input_boolean.speech_notifications
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: template
|
|
||||||
value_template: >
|
|
||||||
{% if is_state('media_player.livingroomCC', 'playing') %}
|
|
||||||
false
|
|
||||||
{% else %}
|
|
||||||
true
|
|
||||||
{% endif %}
|
|
||||||
- service: switch.turn_on
|
- service: switch.turn_on
|
||||||
entity_id: switch.living_room_amp
|
entity_id: switch.living_room_amp
|
||||||
- delay: '00:00:05'
|
- delay: '00:00:05'
|
||||||
@@ -52,11 +57,11 @@ voice_notify:
|
|||||||
data_template:
|
data_template:
|
||||||
volume_level: >
|
volume_level: >
|
||||||
{% if now().strftime("%H")|int < 12 %}
|
{% if now().strftime("%H")|int < 12 %}
|
||||||
0.20
|
0.25
|
||||||
{% elif now().strftime("%H")|int < 18 %}
|
{% elif now().strftime("%H")|int < 18 %}
|
||||||
0.45
|
0.45
|
||||||
{% else %}
|
{% else %}
|
||||||
0.25
|
0.20
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
- service: mqtt.publish
|
- service: mqtt.publish
|
||||||
@@ -80,6 +85,6 @@ voice_notify:
|
|||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.last_message
|
- input_boolean.last_message
|
||||||
- input_boolean.alert_mode
|
- input_boolean.alert_mode
|
||||||
|
|||||||
Reference in New Issue
Block a user