mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
notifications
This commit is contained in:
@@ -13,6 +13,7 @@ condition:
|
|||||||
- "{{ 'driveway' in trigger.payload_json['after']['entered_zones'] }}"
|
- "{{ 'driveway' in trigger.payload_json['after']['entered_zones'] }}"
|
||||||
- "{{ 'from_street' in trigger.payload_json['after']['entered_zones'] }}"
|
- "{{ 'from_street' in trigger.payload_json['after']['entered_zones'] }}"
|
||||||
- "{{ trigger.payload_json['after']['label'] == 'person' }}"
|
- "{{ trigger.payload_json['after']['label'] == 'person' }}"
|
||||||
|
- "{{ is_state('input_boolean.outdoor_snapshots','on') }}"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ condition:
|
|||||||
- '{{ is_state("binary_sensor.outer_garage_door","off") }}'
|
- '{{ is_state("binary_sensor.outer_garage_door","off") }}'
|
||||||
- '{{ is_state("binary_sensor.front_door_contact","off") }}'
|
- '{{ is_state("binary_sensor.front_door_contact","off") }}'
|
||||||
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
|
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
|
||||||
|
- "{{ is_state('input_boolean.outdoor_snapshots','on') }}"
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions: "{{ not group_target }}"
|
- conditions: "{{ not group_target }}"
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ condition:
|
|||||||
- "{{ not stationary }}"
|
- "{{ not stationary }}"
|
||||||
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
|
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
|
||||||
- "{{ not labels|length or object in labels }}"
|
- "{{ not labels|length or object in labels }}"
|
||||||
|
- "{{ is_state('input_boolean.outdoor_snapshots','on') }}"
|
||||||
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
|
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
|
||||||
#- "{{ not garage_door or not is_state(garage_door, 'on') }}"
|
#- "{{ not garage_door or not is_state(garage_door, 'on') }}"
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ condition:
|
|||||||
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
|
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
|
||||||
- '{{ is_state("binary_sensor.front_porch_motion","off") }}'
|
- '{{ is_state("binary_sensor.front_porch_motion","off") }}'
|
||||||
- '{{ is_state("binary_sensor.garage_motion_switch_home_security_motion_detection","off") }}'
|
- '{{ is_state("binary_sensor.garage_motion_switch_home_security_motion_detection","off") }}'
|
||||||
|
- "{{ is_state('input_boolean.outdoor_snapshots','on') }}"
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions: "{{ not group_target }}"
|
- conditions: "{{ not group_target }}"
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ condition:
|
|||||||
- "{{ not stationary }}"
|
- "{{ not stationary }}"
|
||||||
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
|
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
|
||||||
- "{{ not labels|length or object in labels }}"
|
- "{{ not labels|length or object in labels }}"
|
||||||
|
- "{{ is_state('input_boolean.outdoor_snapshots','on') }}"
|
||||||
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
|
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
|
||||||
#- "{{ not garage_door or not is_state(garage_door, 'on') }}"
|
#- "{{ not garage_door or not is_state(garage_door, 'on') }}"
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,14 @@ condition:
|
|||||||
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_household', 'entity_id'))|list)|groupby('state'))['on']|count }}"
|
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_household', 'entity_id'))|list)|groupby('state'))['on']|count }}"
|
||||||
action:
|
action:
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
entity_id: input_boolean.home_occupied
|
target:
|
||||||
|
entity_id: input_boolean.home_occupied
|
||||||
|
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.indoor_snapshots
|
||||||
|
- input_boolean.outdoor_snapshots
|
||||||
- service: automation.turn_on
|
- service: automation.turn_on
|
||||||
data:
|
data:
|
||||||
entity_id: automation.garage_open_nobody_home
|
entity_id: automation.garage_open_nobody_home
|
||||||
|
|||||||
@@ -30,7 +30,13 @@ condition:
|
|||||||
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_household', 'entity_id'))|list)|groupby('state'))['on']|count }}"
|
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_household', 'entity_id'))|list)|groupby('state'))['on']|count }}"
|
||||||
action:
|
action:
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.home_occupied
|
target:
|
||||||
|
entity_id: input_boolean.home_occupied
|
||||||
|
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.indoor_snapshots
|
||||||
|
|
||||||
- service: automation.turn_off
|
- service: automation.turn_off
|
||||||
data:
|
data:
|
||||||
entity_id: automation.garage_open_nobody_home
|
entity_id: automation.garage_open_nobody_home
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ script:
|
|||||||
content_id: '{{ iif(media_content_id is defined,media_content_id,"media-source://media_source/local/Sounds/tts/welcome_to_daddys_house.mp3") }}'
|
content_id: '{{ iif(media_content_id is defined,media_content_id,"media-source://media_source/local/Sounds/tts/welcome_to_daddys_house.mp3") }}'
|
||||||
content_type: '{{ iif(media_content_type is defined,media_content_type,"audio/mpeg") }}'
|
content_type: '{{ iif(media_content_type is defined,media_content_type,"audio/mpeg") }}'
|
||||||
volume: "{{ iif(volume is defined,volume,0.6) }}"
|
volume: "{{ iif(volume is defined,volume,0.6) }}"
|
||||||
original_volume: '{{ iif(state_attr(state_attr("media_player.ytube_music_player","remote_player_id"), "volume_level") is not none,state_attr(state_attr("media_player.ytube_music_player","remote_player_id"), "volume_level"),0.0) }}'
|
original_volume: '{{ iif(is_state("media_player.ytube_music_player","off"),0.0,state_attr(state_attr("media_player.ytube_music_player","remote_player_id"), "volume_level")) }}'
|
||||||
ytube_in_use: '{{ is_state("media_player.ytube_music_player","playing") or is_state("media_player.ytube_music_player","idle") or is_state("media_player.ytube_music_player","paused") }}'
|
ytube_in_use: '{{ is_state("media_player.ytube_music_player","playing") or is_state("media_player.ytube_music_player","idle") or is_state("media_player.ytube_music_player","paused") }}'
|
||||||
|
|
||||||
sequence:
|
sequence:
|
||||||
@@ -63,8 +63,7 @@ script:
|
|||||||
delay:
|
delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 0
|
seconds: 2
|
||||||
milliseconds: 250
|
|
||||||
|
|
||||||
# This looks to cause the first part of the message to be missed.
|
# This looks to cause the first part of the message to be missed.
|
||||||
# Instead of initally muting the speakers, I'll just set them to the appropriate volume off the bat
|
# Instead of initally muting the speakers, I'll just set them to the appropriate volume off the bat
|
||||||
@@ -86,8 +85,7 @@ script:
|
|||||||
delay:
|
delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 0
|
seconds: 2
|
||||||
milliseconds: 250
|
|
||||||
|
|
||||||
- alias: "Play the announcement"
|
- alias: "Play the announcement"
|
||||||
service: media_player.play_media
|
service: media_player.play_media
|
||||||
@@ -113,14 +111,13 @@ script:
|
|||||||
- alias: Wait for the specified media_player(s) to become idle
|
- alias: Wait for the specified media_player(s) to become idle
|
||||||
wait_for_trigger:
|
wait_for_trigger:
|
||||||
- platform: template
|
- platform: template
|
||||||
value_template: "{{ is_state(media_player, 'idle') }}"
|
value_template: "{{ is_state(media_player, 'idle') or is_state(media_player, 'off')}}"
|
||||||
|
|
||||||
- alias: "Give a second of dead air after the announcement"
|
- alias: "Give a second of dead air after the announcement"
|
||||||
delay:
|
delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 0
|
seconds: 2
|
||||||
milliseconds: 250
|
|
||||||
|
|
||||||
- choose:
|
- choose:
|
||||||
- alias: "Ytube music player was playing something earlier"
|
- alias: "Ytube music player was playing something earlier"
|
||||||
|
|||||||
Reference in New Issue
Block a user