These sensors should hopefully prove more reliable #108
This commit is contained in:
@ -209,12 +209,9 @@
|
|||||||
description: Runs when family arrives at home
|
description: Runs when family arrives at home
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.adults_home_fix
|
entity_id:
|
||||||
not_from:
|
- binary_sensor.parents_home
|
||||||
- broken
|
to: 'on'
|
||||||
- unavailable
|
|
||||||
- unknown
|
|
||||||
to: home
|
|
||||||
condition:
|
condition:
|
||||||
- condition: not
|
- condition: not
|
||||||
conditions:
|
conditions:
|
||||||
@ -239,12 +236,9 @@
|
|||||||
description: Runs when the family has left home
|
description: Runs when the family has left home
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.adults_home_fix
|
entity_id:
|
||||||
not_from:
|
- binary_sensor.parents_home
|
||||||
- broken
|
to: 'off'
|
||||||
- unavailable
|
|
||||||
- unknown
|
|
||||||
to: not_home
|
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.guest_mode
|
entity_id: input_boolean.guest_mode
|
||||||
@ -263,8 +257,8 @@
|
|||||||
description: ''
|
description: ''
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.adults
|
entity_id: binary_sensor.parents_home
|
||||||
to: not_home
|
to: 'off'
|
||||||
for:
|
for:
|
||||||
hours: 1
|
hours: 1
|
||||||
minutes: 0
|
minutes: 0
|
||||||
|
@ -86,8 +86,8 @@ automation:
|
|||||||
id: sleep-off
|
id: sleep-off
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.adults
|
entity_id: binary_sensor.parents_home
|
||||||
state: 'home'
|
state: 'on'
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
|
@ -1006,8 +1006,8 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ type in ['weather','Weather'] and is_state('binary_sensor.audible_weather_alerts_allowed','on') }}"
|
value_template: "{{ type in ['weather','Weather'] and is_state('binary_sensor.audible_weather_alerts_allowed','on') }}"
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.adults
|
entity_id: binary_sensor.parents_home
|
||||||
state: 'home'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
@ -1155,8 +1155,8 @@ script:
|
|||||||
entity_id: input_boolean.audible_notifications
|
entity_id: input_boolean.audible_notifications
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.adults
|
entity_id: binary_sensor.parents_home
|
||||||
state: 'home'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
@ -168,13 +168,17 @@ template:
|
|||||||
unique_id: 2419e826-b276-434c-b5c6-e42c065a73ff
|
unique_id: 2419e826-b276-434c-b5c6-e42c065a73ff
|
||||||
state: "{{ is_state('device_tracker.kallen_iphone','home') or is_state('device_tracker.life360_kallen_stork','home') }}"
|
state: "{{ is_state('device_tracker.kallen_iphone','home') or is_state('device_tracker.life360_kallen_stork','home') }}"
|
||||||
device_class: presence
|
device_class: presence
|
||||||
- name: "Nerds Home"
|
|
||||||
unique_id: 2672a6a2-4be4-495c-b479-ffc7c6df67d2
|
|
||||||
state: "{{ is_state('group.family','home') and (is_state('person.tony_stork','home') or is_state('person.kallen_stork','home')) }}"
|
|
||||||
device_class: presence
|
|
||||||
- name: "Parents Home"
|
- name: "Parents Home"
|
||||||
unique_id: 8de02d19-60a6-436d-9187-1cfc70d6c297
|
unique_id: 8de02d19-60a6-436d-9187-1cfc70d6c297
|
||||||
state: "{{ is_state('group.adults','home') and (is_state('person.tony_stork','home') or is_state('person.christina_stork','home')) }}"
|
state: "{{ is_state('binary_sensor.tony_home','on') or is_state('binary_sensor.tina_home','on') }}"
|
||||||
|
device_class: presence
|
||||||
|
- name: "Family Home"
|
||||||
|
unique_id: c1ec8744-3d76-4887-a0f2-572459bba8a2
|
||||||
|
state: "{{ is_state('binary_sensor.tony_home','on') or is_state('binary_sensor.tina_home','on') or (is_state('binary_sensor.parents_home','on') and is_state('binary_sensor.kallen_home','on')) }}"
|
||||||
|
device_class: presence
|
||||||
|
- name: "Nerds Home"
|
||||||
|
unique_id: 2672a6a2-4be4-495c-b479-ffc7c6df67d2
|
||||||
|
state: "{{ is_state('binary_sensor.tony_home','on') or is_state('binary_sensor.kallen_home','on') }}"
|
||||||
device_class: presence
|
device_class: presence
|
||||||
- name: "Basement Occupied"
|
- name: "Basement Occupied"
|
||||||
unique_id: 20039c29-8b9d-436d-ba6c-8f2c2bda1db0
|
unique_id: 20039c29-8b9d-436d-ba6c-8f2c2bda1db0
|
||||||
@ -252,42 +256,6 @@ template:
|
|||||||
{{ sleeping | selectattr('state','eq','on') | list | count }}
|
{{ sleeping | selectattr('state','eq','on') | list | count }}
|
||||||
unit_of_measurement: ''
|
unit_of_measurement: ''
|
||||||
icon: mdi:sleep
|
icon: mdi:sleep
|
||||||
- unique_id: c63364fb-c3cb-44a6-8fba-5d63e3f9c981
|
|
||||||
name: "Adults Home Fix"
|
|
||||||
state: >
|
|
||||||
{% if states('person.tony_stork') in ['unknown','unavailable'] or states('person.christina_stork') in ['unknown','unavailable'] %}
|
|
||||||
broken
|
|
||||||
{% elif is_state('group.adults','home') %}
|
|
||||||
home
|
|
||||||
{% elif is_state('group.adults','not_home') %}
|
|
||||||
not_home
|
|
||||||
{% endif %}
|
|
||||||
icon: >
|
|
||||||
{% if states('person.tony_stork') in ['unknown','unavailable'] or states('person.christina_stork') in ['unknown','unavailable'] %}
|
|
||||||
mdi:alert-circle
|
|
||||||
{% elif is_state('group.adults','home') %}
|
|
||||||
mdi:home
|
|
||||||
{% elif is_state('group.adults','not_home') %}
|
|
||||||
mdi:home-outline
|
|
||||||
{% endif %}
|
|
||||||
- unique_id: f27a1a56-0c7e-46ee-9f21-a48cc1a0421c
|
|
||||||
name: "Family Home Fix"
|
|
||||||
state: >
|
|
||||||
{% if states('person.tony_stork') in ['unknown','unavailable'] or states('person.christina_stork') in ['unknown','unavailable'] or states('person.kallen_stork') in ['unknown','unavailable'] %}
|
|
||||||
broken
|
|
||||||
{% elif is_state('group.family','home') %}
|
|
||||||
home
|
|
||||||
{% elif is_state('group.family','not_home') %}
|
|
||||||
not_home
|
|
||||||
{% endif %}
|
|
||||||
icon: >
|
|
||||||
{% if states('person.tony_stork') in ['unknown','unavailable'] or states('person.christina_stork') in ['unknown','unavailable'] or states('person.kallen_stork') in ['unknown','unavailable'] %}
|
|
||||||
mdi:alert-circle
|
|
||||||
{% elif is_state('group.family','home') %}
|
|
||||||
mdi:home
|
|
||||||
{% elif is_state('group.family','not_home') %}
|
|
||||||
mdi:home-outline
|
|
||||||
{% endif %}
|
|
||||||
- unique_id: 2620a9d0-01f0-4af4-8438-a0c860735aab
|
- unique_id: 2620a9d0-01f0-4af4-8438-a0c860735aab
|
||||||
name: "Tony"
|
name: "Tony"
|
||||||
state: >-
|
state: >-
|
||||||
@ -563,8 +531,8 @@ automation:
|
|||||||
# condition:
|
# condition:
|
||||||
# - alias: "Are we home?"
|
# - alias: "Are we home?"
|
||||||
# condition: state
|
# condition: state
|
||||||
# entity_id: group.adults
|
# entity_id: binary_sensor.parents_home
|
||||||
# state: "home"
|
# state: "on"
|
||||||
# action:
|
# action:
|
||||||
# - alias: "Save Current Light State"
|
# - alias: "Save Current Light State"
|
||||||
# service: scene.create
|
# service: scene.create
|
||||||
@ -672,11 +640,8 @@ automation:
|
|||||||
{{ is_state('input_boolean.vacation_mode','off') and (tony >= 90) and (tina >= 90) }}
|
{{ is_state('input_boolean.vacation_mode','off') and (tony >= 90) and (tina >= 90) }}
|
||||||
id: leave-radius
|
id: leave-radius
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.adults
|
entity_id: binary_sensor.parents_home
|
||||||
not_from:
|
to: 'on'
|
||||||
- 'unknown'
|
|
||||||
- 'unavailable'
|
|
||||||
to: 'home'
|
|
||||||
id: arrive-home
|
id: arrive-home
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
@ -846,8 +811,8 @@ script:
|
|||||||
alias: Family Is Away
|
alias: Family Is Away
|
||||||
sequence:
|
sequence:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.adults
|
entity_id: binary_sensor.parents_home
|
||||||
state: not_home
|
state: 'off'
|
||||||
- service: script.text_notify
|
- service: script.text_notify
|
||||||
data:
|
data:
|
||||||
who: >
|
who: >
|
||||||
@ -864,7 +829,7 @@ script:
|
|||||||
- action: "SKIP_AWAY"
|
- action: "SKIP_AWAY"
|
||||||
title: Skip Away Mode
|
title: Skip Away Mode
|
||||||
icon: mdi:debug-step-over
|
icon: mdi:debug-step-over
|
||||||
- wait_template: "{{ is_state('input_boolean.away_mode_skipped','on') or is_state('group.adults','home') }}"
|
- wait_template: "{{ is_state('input_boolean.away_mode_skipped','on') or is_state('binary_sensor.parents_home','off') }}"
|
||||||
continue_on_timeout: true
|
continue_on_timeout: true
|
||||||
timeout:
|
timeout:
|
||||||
minutes: 1
|
minutes: 1
|
||||||
|
@ -224,8 +224,8 @@ automation:
|
|||||||
id: wakeup
|
id: wakeup
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.adults
|
entity_id: binary_sensor.parents_home
|
||||||
state: 'home'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
@ -279,8 +279,8 @@ automation:
|
|||||||
at: input_datetime.morning_alarm_rearm
|
at: input_datetime.morning_alarm_rearm
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.adults
|
entity_id: binary_sensor.parents_home
|
||||||
state: 'home'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
@ -447,8 +447,8 @@ automation:
|
|||||||
notification_id: lockdown_issue
|
notification_id: lockdown_issue
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.adults
|
entity_id: binary_sensor.parents_home
|
||||||
state: 'not_home'
|
state: 'off'
|
||||||
then:
|
then:
|
||||||
- service: alarm_control_panel.alarm_arm_away
|
- service: alarm_control_panel.alarm_arm_away
|
||||||
target:
|
target:
|
||||||
|
Reference in New Issue
Block a user