Adjust for K now carrying his own phone with him
This commit is contained in:
@ -186,7 +186,7 @@
|
|||||||
description: Runs when family arrives at home
|
description: Runs when family arrives at home
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.family
|
entity_id: group.adults
|
||||||
from: not_home
|
from: not_home
|
||||||
to: home
|
to: home
|
||||||
- platform: event
|
- platform: event
|
||||||
@ -226,7 +226,7 @@
|
|||||||
description: Runs when the family has left home
|
description: Runs when the family has left home
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.family
|
entity_id: group.adults
|
||||||
from: home
|
from: home
|
||||||
to: not_home
|
to: not_home
|
||||||
- platform: event
|
- platform: event
|
||||||
@ -260,7 +260,7 @@
|
|||||||
description: ''
|
description: ''
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.family
|
entity_id: group.adults
|
||||||
to: not_home
|
to: not_home
|
||||||
for:
|
for:
|
||||||
hours: 1
|
hours: 1
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
Family:
|
Family:
|
||||||
- person.tony_stork
|
- person.tony_stork
|
||||||
- person.christina_stork
|
- person.christina_stork
|
||||||
|
- person.kallen_stork
|
||||||
|
|
||||||
|
Adults:
|
||||||
|
- person.tony_stork
|
||||||
|
- person.christina_stork
|
||||||
|
|
||||||
Presence Simulation:
|
Presence Simulation:
|
||||||
- light.hallway_overhead
|
- light.hallway_overhead
|
||||||
|
Submodule node-red/projects/NerdFlows updated: 8a8bfadc92...2057ce3404
@ -759,7 +759,7 @@ script:
|
|||||||
entity_id: input_boolean.audible_notifications
|
entity_id: input_boolean.audible_notifications
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.family
|
entity_id: group.adults
|
||||||
state: 'home'
|
state: 'home'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
@ -863,7 +863,7 @@ script:
|
|||||||
entity_id: input_boolean.audible_notifications
|
entity_id: input_boolean.audible_notifications
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.family
|
entity_id: group.adults
|
||||||
state: 'home'
|
state: 'home'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
|
@ -70,7 +70,7 @@ sensor:
|
|||||||
{% set person = states.person.tony_stork.state %}
|
{% set person = states.person.tony_stork.state %}
|
||||||
{% if person in ['Home','home'] %}
|
{% if person in ['Home','home'] %}
|
||||||
Home
|
Home
|
||||||
{% elif person in ['WalMart','Kroger','Chief','Meijer','Dollar General - Clinton St','Aldi'] %}
|
{% elif person in ['WalMart','Wal-Mart','Kroger','Chief','Meijer','Dollar General - Clinton St','Aldi'] %}
|
||||||
Grocery Store
|
Grocery Store
|
||||||
{% elif person in ['Rite Aid'] %}
|
{% elif person in ['Rite Aid'] %}
|
||||||
Pharmacy
|
Pharmacy
|
||||||
@ -95,7 +95,7 @@ sensor:
|
|||||||
{% set person = states.person.christina_stork.state %}
|
{% set person = states.person.christina_stork.state %}
|
||||||
{% if person in ['Home','home'] %}
|
{% if person in ['Home','home'] %}
|
||||||
Home
|
Home
|
||||||
{% elif person in ['WalMart','Kroger','Chief','Meijer','Dollar General - Clinton St','Aldi'] %}
|
{% elif person in ['WalMart','Wal-Mart','Kroger','Chief','Meijer','Dollar General - Clinton St','Aldi'] %}
|
||||||
Grocery Store
|
Grocery Store
|
||||||
{% elif person in ['Rite Aid'] %}
|
{% elif person in ['Rite Aid'] %}
|
||||||
Pharmacy
|
Pharmacy
|
||||||
@ -119,19 +119,27 @@ sensor:
|
|||||||
friendly_name: "Kallen"
|
friendly_name: "Kallen"
|
||||||
unit_of_measurement: ""
|
unit_of_measurement: ""
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% if is_state('input_boolean.kallen_at_school', 'on') %}
|
{% set person = states.person.kallen_stork.state %}
|
||||||
School
|
{% if person in ['Home','home'] %}
|
||||||
{% elif is_state('calendar.kallen_events', 'on') %}
|
|
||||||
{{ state_attr('calendar.kallen_events', 'message') }}
|
|
||||||
{%- elif is_state('person.tony_stork', 'home') and is_state('person.christina_stork', 'home') and is_state('input_boolean.kallen_at_school', 'off')%}
|
|
||||||
Home
|
Home
|
||||||
{%- elif is_state('person.tony_stork', 'Hospital') and is_state('input_boolean.kallen_at_school', 'off')%}
|
{% elif person in ['WalMart','Wal-Mart','Kroger','Chief','Meijer','Dollar General - Clinton St','Aldi'] %}
|
||||||
{{ states('sensor.tina_location') }}
|
Grocery Store
|
||||||
{%- elif is_state('person.christina_stork', 'Bob Evans') and is_state('input_boolean.kallen_at_school', 'off')%}
|
{% elif person in ['Rite Aid'] %}
|
||||||
{{ states('sensor.tony_location') }}
|
Pharmacy
|
||||||
{% else %}
|
{% else %}
|
||||||
Unknown
|
{% if person in ['not_home','Stationary'] %}
|
||||||
|
{{ state_attr('device_tracker.life360_kallen_stork','address') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('person.kallen_stork') }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
icon_template: >-
|
||||||
|
{% set person = states.person.kallen_stork.state %}
|
||||||
|
{% if person in ['Home','home'] %}
|
||||||
|
mdi:home
|
||||||
|
{% else %}
|
||||||
|
mdi:car
|
||||||
|
{% endif %}
|
||||||
people_home:
|
people_home:
|
||||||
friendly_name: "People"
|
friendly_name: "People"
|
||||||
unit_of_measurement: 'home'
|
unit_of_measurement: 'home'
|
||||||
@ -167,26 +175,34 @@ template:
|
|||||||
- name: "Tina Home"
|
- name: "Tina Home"
|
||||||
state: "{{ is_state('device_tracker.tinas_iphone', 'home') or is_state('device_tracker.life360_christina_stork','home') }}"
|
state: "{{ is_state('device_tracker.tinas_iphone', 'home') or is_state('device_tracker.life360_christina_stork','home') }}"
|
||||||
device_class: presence
|
device_class: presence
|
||||||
|
- binary_sensor:
|
||||||
|
- name: "Kallen Home"
|
||||||
|
state: "{{ is_state('device_tracker.kallen_iphone','home') or is_state('device_tracker.life360_kallen_stork','home') }}"
|
||||||
|
device_class: presence
|
||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: "Nerds Home"
|
- name: "Nerds Home"
|
||||||
state: >-
|
state: >-
|
||||||
{% if is_state('group.family','home') %}
|
{% if is_state('group.family','home') %}
|
||||||
{% if is_state('binary_sensor.tony_home','on') or is_state('device_tracker.kallen_iphone','home') %}
|
{% if is_state('binary_sensor.tony_home','on') or is_state('binary_sensor.kallen_home','on') %}
|
||||||
true
|
true
|
||||||
{% else %}
|
{% else %}
|
||||||
false
|
false
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
false
|
||||||
{% endif %}
|
{% endif %}
|
||||||
device_class: presence
|
device_class: presence
|
||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: "Parents Home"
|
- name: "Parents Home"
|
||||||
state: >-
|
state: >-
|
||||||
{% if is_state('group.family','home') %}
|
{% if is_state('group.adults','home') %}
|
||||||
{% if is_state('binary_sensor.tony_home','on') or is_state('binary_sensor.tina_home','on') %}
|
{% if is_state('binary_sensor.tony_home','on') or is_state('binary_sensor.tina_home','on') %}
|
||||||
true
|
true
|
||||||
{% else %}
|
{% else %}
|
||||||
false
|
false
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
false
|
||||||
{% endif %}
|
{% endif %}
|
||||||
device_class: presence
|
device_class: presence
|
||||||
|
|
||||||
@ -305,7 +321,7 @@ automation:
|
|||||||
condition:
|
condition:
|
||||||
- alias: "Are we home?"
|
- alias: "Are we home?"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: group.family
|
entity_id: group.adults
|
||||||
state: "home"
|
state: "home"
|
||||||
action:
|
action:
|
||||||
- alias: "Save Current Light State"
|
- alias: "Save Current Light State"
|
||||||
@ -392,7 +408,7 @@ script:
|
|||||||
alias: Family Is Away
|
alias: Family Is Away
|
||||||
sequence:
|
sequence:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.family
|
entity_id: group.adults
|
||||||
state: not_home
|
state: not_home
|
||||||
- service: notify.all_ios
|
- service: notify.all_ios
|
||||||
data:
|
data:
|
||||||
@ -404,7 +420,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.family','home') }}"
|
- wait_template: "{{ is_state('input_boolean.away_mode_skipped','on') or is_state('group.adults','home') }}"
|
||||||
continue_on_timeout: true
|
continue_on_timeout: true
|
||||||
timeout:
|
timeout:
|
||||||
minutes: 1
|
minutes: 1
|
||||||
@ -415,7 +431,7 @@ script:
|
|||||||
tag: skip-away
|
tag: skip-away
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ is_state('input_boolean.away_mode_skipped','on') or is_state('group.family','home') }}"
|
value_template: "{{ is_state('input_boolean.away_mode_skipped','on') or is_state('group.adults','home') }}"
|
||||||
then:
|
then:
|
||||||
- stop: Away Mode Skipped
|
- stop: Away Mode Skipped
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
|
@ -121,7 +121,7 @@ automation:
|
|||||||
at: input_datetime.master_bedroom_wakeup
|
at: input_datetime.master_bedroom_wakeup
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.family
|
entity_id: group.adults
|
||||||
state: 'home'
|
state: 'home'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
@ -147,7 +147,7 @@ automation:
|
|||||||
at: input_datetime.morning_alarm_rearm
|
at: input_datetime.morning_alarm_rearm
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.family
|
entity_id: group.adults
|
||||||
state: 'home'
|
state: 'home'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
binary_sensor:
|
binary_sensor:
|
||||||
- name: People Present
|
- name: People Present
|
||||||
state: >
|
state: >
|
||||||
{{ is_state('person.tony_stork', 'home')
|
{{ is_state('person.tony_stork', 'home') or is_state('person.christina_stork', 'home') }}
|
||||||
or is_state('person.christina_stork', 'home') }}
|
|
||||||
|
|
||||||
- name: Precipitation
|
- name: Precipitation
|
||||||
state: >-
|
state: >-
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
{%- macro getReport() -%}
|
{%- macro getReport() -%}
|
||||||
<p>
|
<p>
|
||||||
"Welcome home, "
|
"Welcome home, "
|
||||||
{% if is_state('person.tony_stork','home') and is_state('person.christina_stork','home') %}
|
{% if is_state('group.family','home') %}
|
||||||
|
"Stork family."
|
||||||
|
{% elif is_state('group.adults','home') %}
|
||||||
"Stork family. "
|
"Stork family. "
|
||||||
{% elif is_state('person.tony_stork','home') %}
|
{% elif is_state('person.tony_stork','home') %}
|
||||||
"Tony. "
|
"Tony. "
|
||||||
@ -25,7 +27,7 @@
|
|||||||
{% set endbefore = state_attr('input_datetime.kallen_school_day_end','timestamp') - 3600 %}
|
{% set endbefore = state_attr('input_datetime.kallen_school_day_end','timestamp') - 3600 %}
|
||||||
{% set endafter = state_attr('input_datetime.kallen_school_day_end','timestamp') + 3600 %}
|
{% set endafter = state_attr('input_datetime.kallen_school_day_end','timestamp') + 3600 %}
|
||||||
{% set current = ((now().hour * 60 + now().minute) * 60 ) %}
|
{% set current = ((now().hour * 60 + now().minute) * 60 ) %}
|
||||||
{% if is_state('input_boolean.kallen_school_today_extended','on') and current > endbefore and current < endafter %}
|
{% if is_state('person.kallen_stork','home') and is_state('input_boolean.kallen_school_today_extended','on') and current > endbefore and current < endafter %}
|
||||||
"Welcome home Collin as well, "
|
"Welcome home Collin as well, "
|
||||||
{{ [
|
{{ [
|
||||||
'I hope you had a great day at school! ',
|
'I hope you had a great day at school! ',
|
||||||
@ -42,7 +44,7 @@
|
|||||||
'You did not achieve eighth position this morning, did you? ',
|
'You did not achieve eighth position this morning, did you? ',
|
||||||
] | random }}
|
] | random }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.kallen_school_cancelled','on') %}
|
{% elif is_state('input_boolean.kallen_school_cancelled','on') and is_state('person.kallen_stork','home') %}
|
||||||
"I hope you are enjoying your free day off from school, Collin. "
|
"I hope you are enjoying your free day off from school, Collin. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
Reference in New Issue
Block a user