2019-07-12 20:35:11 +00:00
|
|
|
###############################################################################
|
|
|
|
# @author : Jeffrey Stone
|
|
|
|
# @date : 02/19/2019
|
|
|
|
# @package : Presence
|
|
|
|
# @description : A Collection of Presence Related Trackers and Sensors
|
|
|
|
###############################################################################
|
|
|
|
|
2020-06-12 20:02:42 +00:00
|
|
|
# Testing Proximity Sensors
|
|
|
|
proximity:
|
|
|
|
home_jeff:
|
|
|
|
devices:
|
|
|
|
- device_tracker.life360_jeffrey_stone
|
|
|
|
zone: home
|
|
|
|
tolerance: 5
|
|
|
|
unit_of_measurement: mi
|
|
|
|
home_kat:
|
|
|
|
devices:
|
|
|
|
- device_tracker.life360_kat_stone
|
|
|
|
zone: home
|
|
|
|
tolerance: 5
|
|
|
|
unit_of_measurement: mi
|
|
|
|
home:
|
|
|
|
devices:
|
|
|
|
- device_tracker.life360_jeffrey_stone
|
|
|
|
- device_tracker.life360_kat_stone
|
|
|
|
zone: home
|
|
|
|
tolerance: 5
|
|
|
|
unit_of_measurement: mi
|
|
|
|
|
2019-07-12 20:35:11 +00:00
|
|
|
sensor:
|
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
jeff_location:
|
|
|
|
friendly_name: "Jeff's Current Location"
|
|
|
|
unit_of_measurement: ''
|
|
|
|
value_template: >-
|
2021-05-24 15:55:52 +00:00
|
|
|
{% set person = states.person.jeffrey.state %}
|
|
|
|
{%- if person in ['Sprouts','Kroger1','Kroger2'] %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Grocery Store
|
2021-05-24 15:55:52 +00:00
|
|
|
{% elif person in ['HomeDepot','Lowes'] %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Home Improvement Store
|
2021-05-24 15:55:52 +00:00
|
|
|
{% elif person in ['Walmart','Target'] %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Super Store
|
|
|
|
{% else %}
|
2021-05-24 15:55:52 +00:00
|
|
|
{% if person in ['not_home'] %}
|
|
|
|
{{ states.device_tracker.life360_jeffrey_stone.attributes.address }}
|
|
|
|
{% else %}
|
|
|
|
{{ states.person.jeffrey.state }}
|
|
|
|
{%- endif %}
|
2019-07-12 20:35:11 +00:00
|
|
|
{%- endif %}
|
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
skylar_location:
|
|
|
|
friendly_name: "Skylar's Current Location"
|
|
|
|
unit_of_measurement: ''
|
|
|
|
value_template: >-
|
2021-05-24 15:55:52 +00:00
|
|
|
{% if is_state('input_boolean.skylar_school', 'on') or is_state('person.skylar', 'Starling')%}
|
2019-10-06 00:07:16 +00:00
|
|
|
school
|
2021-05-24 15:55:52 +00:00
|
|
|
{% elif is_state('calendar.skylar_events', 'on') %}
|
|
|
|
{{ states.calendar.skylar_events.attributes.message }}
|
2021-06-17 01:13:16 +00:00
|
|
|
{%- elif is_state('person.jeffrey', 'home') and is_state('person.katherine', 'home') and is_state('input_boolean.skylar_school', 'off')%}
|
2019-07-12 20:35:11 +00:00
|
|
|
home
|
2021-06-17 01:13:16 +00:00
|
|
|
{%- elif is_state('person.jeffrey', 'Summit') and is_state('input_boolean.skylar_school', 'off')%}
|
2019-10-06 00:07:16 +00:00
|
|
|
{{ states.sensor.kat_location.state }}
|
2021-06-17 01:13:16 +00:00
|
|
|
{%- elif is_state('person.katherine', 'ZooAtlanta') and is_state('input_boolean.skylar_school', 'off')%}
|
|
|
|
{{ states.person.jeffrey.state }}
|
2019-07-12 20:35:11 +00:00
|
|
|
{% else %}
|
2021-06-17 01:13:16 +00:00
|
|
|
{{ states.person.skylar.state }}
|
2019-07-12 20:35:11 +00:00
|
|
|
{%- endif %}
|
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
kat_location:
|
|
|
|
friendly_name: "Kat's Current Location"
|
|
|
|
unit_of_measurement: ''
|
|
|
|
value_template: >-
|
2021-05-24 15:55:52 +00:00
|
|
|
{% set person = states.person.katherine.state %}
|
|
|
|
{%- if person in ['Sprouts','Kroger1','Kroger2'] %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Grocery Store
|
2021-05-24 15:55:52 +00:00
|
|
|
{% elif person in ['HomeDepot','Lowes'] %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Home Improvement Store
|
2021-05-24 15:55:52 +00:00
|
|
|
{% elif person in ['Walmart','Target'] %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Super Store
|
|
|
|
{% else %}
|
2021-05-24 15:55:52 +00:00
|
|
|
{%- if person in ['ZooAtlanta'] %}
|
|
|
|
Zoo Atlanta
|
|
|
|
{% elif person in ['not_home'] %}
|
|
|
|
{{ states.device_tracker.life360_kat_stone.attributes.address }}
|
|
|
|
{% else %}
|
|
|
|
{{ states.person.katherine.state }}
|
|
|
|
{%- endif %}
|
2019-07-12 20:35:11 +00:00
|
|
|
{%- endif %}
|
|
|
|
- platform: mqtt
|
|
|
|
name: "Family Status"
|
|
|
|
state_topic: "house/family/status"
|
|
|
|
payload_available: "online"
|
|
|
|
payload_not_available: "offline"
|
2021-05-24 15:55:52 +00:00
|
|
|
- platform: mqtt
|
|
|
|
name: "Family Arrived"
|
|
|
|
state_topic: "house/family/arrived"
|
|
|
|
payload_available: "online"
|
|
|
|
payload_not_available: "offline"
|
2019-07-12 20:35:11 +00:00
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
jeff_home:
|
|
|
|
value_template: >-
|
2021-05-24 15:55:52 +00:00
|
|
|
{{ is_state('device_tracker.jeffrey_s_iphone_11', 'home') or is_state('device_tracker.jeffrey_s_iphone_11_app', 'home')
|
2019-07-12 20:35:11 +00:00
|
|
|
or is_state('device_tracker.life360_jeffrey_stone', 'home') }}
|
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
kat_home:
|
|
|
|
value_template: >-
|
2020-04-24 18:37:47 +00:00
|
|
|
{{ is_state('device_tracker.iphone', 'home')
|
2021-05-24 15:55:52 +00:00
|
|
|
or is_state('device_tracker.life360_kat_stone', 'home') or is_state('device_tracker.iphone', 'home') }}
|
2019-07-14 01:38:53 +00:00
|
|
|
|
|
|
|
automation:
|
2020-12-03 03:55:11 +00:00
|
|
|
- id: skylar_is_awake
|
|
|
|
alias: Skylar is Awake
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
2021-05-24 15:55:52 +00:00
|
|
|
entity_id: binary_sensor.skylar_bedroom_motion_occupancy
|
|
|
|
to: 'on'
|
|
|
|
from: 'off'
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.skylar_room_occupancy
|
2020-12-03 03:55:11 +00:00
|
|
|
to: 'on'
|
2020-12-04 06:01:28 +00:00
|
|
|
from: 'off'
|
2020-12-03 03:55:11 +00:00
|
|
|
condition:
|
|
|
|
- condition: time
|
|
|
|
after: '05:00:00'
|
|
|
|
before: '08:30:00'
|
2020-12-04 06:01:28 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.skylar_awake
|
|
|
|
state: 'off'
|
2020-12-03 03:55:11 +00:00
|
|
|
action:
|
|
|
|
- service: input_datetime.set_datetime
|
|
|
|
entity_id: input_datetime.skylar_awake_at
|
|
|
|
data:
|
|
|
|
time: "{{ now().strftime('%H:%M') }}"
|
|
|
|
- service: input_boolean.turn_on
|
|
|
|
entity_id: input_boolean.skylar_awake
|
|
|
|
|
2021-05-24 15:55:52 +00:00
|
|
|
- id: skylar_early_morning_tv
|
|
|
|
alias: Skylar Early Morning TV
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: media_player.theater_tv
|
|
|
|
to: 'off'
|
|
|
|
from: 'on'
|
|
|
|
- platform: state
|
|
|
|
entity_id: media_player.croft_tv
|
|
|
|
to: 'playing'
|
|
|
|
condition:
|
|
|
|
- condition: time
|
|
|
|
after: '05:00:00'
|
|
|
|
before: '08:30:00'
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.skylar_dressed_reminder
|
|
|
|
state: 'off'
|
|
|
|
action:
|
|
|
|
- service: script.status_annc
|
|
|
|
data:
|
|
|
|
who: >-
|
|
|
|
{% if is_state('media_player.theater_tv', 'on') %}
|
|
|
|
theater
|
|
|
|
{% else %}
|
|
|
|
croft
|
|
|
|
{% endif %}
|
|
|
|
call_interuption: 1
|
|
|
|
call_skylar_dressed_reminder: 1
|
|
|
|
- service: input_boolean.turn_on
|
|
|
|
entity_id: input_boolean.skylar_dressed_reminder
|
|
|
|
|
2019-07-14 01:38:53 +00:00
|
|
|
- id: kat_arrives_zoo
|
|
|
|
alias: Kat Arrives at Zoo
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: zone
|
|
|
|
event: enter
|
|
|
|
zone: zone.zoo_atlanta
|
2019-07-24 18:09:46 +00:00
|
|
|
entity_id: person.katherine
|
2019-07-14 01:38:53 +00:00
|
|
|
action:
|
|
|
|
- service: input_boolean.turn_off
|
|
|
|
entity_id: input_boolean.kat_travel_monitor
|
2021-05-24 15:55:52 +00:00
|
|
|
- service: script.status_annc
|
|
|
|
data:
|
|
|
|
who: '{{ states.sensor.room_presence.state }}'
|
|
|
|
speech_message: 'Kat has arrived at work.'
|
2019-07-14 21:02:31 +00:00
|
|
|
|
2019-07-14 01:38:53 +00:00
|
|
|
- id: kat_leaves_zoo
|
|
|
|
alias: Kat Leaves Zoo Notification
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: zone
|
|
|
|
event: leave
|
|
|
|
zone: zone.zoo_atlanta
|
2019-07-24 18:09:46 +00:00
|
|
|
entity_id: person.katherine
|
2019-07-14 01:38:53 +00:00
|
|
|
action:
|
|
|
|
- service: input_boolean.turn_on
|
|
|
|
entity_id: input_boolean.kat_travel_monitor
|
2021-05-24 15:55:52 +00:00
|
|
|
- service: script.status_annc
|
2020-12-03 03:55:11 +00:00
|
|
|
data_template:
|
2021-05-24 15:55:52 +00:00
|
|
|
who: '{{ states.sensor.room_presence.state }}'
|
|
|
|
call_interpruption: 1
|
|
|
|
call_kat_location: 1
|
2020-12-04 06:01:28 +00:00
|
|
|
|
2019-10-19 20:09:45 +00:00
|
|
|
|
2019-10-06 00:07:16 +00:00
|
|
|
- id: skylar_at_school
|
|
|
|
alias: Skylar is at School
|
|
|
|
trigger:
|
2021-05-24 15:55:52 +00:00
|
|
|
- entity_id: person.jeffrey
|
|
|
|
event: leave
|
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
|
|
|
- entity_id: person.katherine
|
|
|
|
event: leave
|
2019-10-06 00:07:16 +00:00
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
2021-05-24 15:55:52 +00:00
|
|
|
- entity_id: person.skylar
|
2019-10-06 00:07:16 +00:00
|
|
|
event: enter
|
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
|
|
|
condition:
|
2021-05-24 15:55:52 +00:00
|
|
|
- condition: time
|
2021-08-04 19:57:44 +00:00
|
|
|
before: "13:30:00"
|
2021-05-24 15:55:52 +00:00
|
|
|
weekday:
|
|
|
|
- mon
|
|
|
|
- tue
|
|
|
|
- wed
|
|
|
|
- thu
|
|
|
|
- fri
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.skylar_school
|
|
|
|
state: 'off'
|
2019-10-06 00:07:16 +00:00
|
|
|
action:
|
|
|
|
- service: input_boolean.turn_on
|
|
|
|
entity_id: input_boolean.skylar_school
|
2021-05-24 15:55:52 +00:00
|
|
|
- service: script.text_alert
|
|
|
|
data:
|
|
|
|
who: parents
|
|
|
|
message: "Skylar has been dropped off at school."
|
2019-10-06 00:07:16 +00:00
|
|
|
initial_state: true
|
|
|
|
|
|
|
|
- id: skylar_left_school
|
|
|
|
alias: Skylar left School
|
|
|
|
trigger:
|
2021-05-24 15:55:52 +00:00
|
|
|
- entity_id: person.jeffrey
|
|
|
|
event: leave
|
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
|
|
|
- entity_id: person.katherine
|
2019-10-06 00:07:16 +00:00
|
|
|
event: leave
|
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
2021-05-24 15:55:52 +00:00
|
|
|
- entity_id: person.skylar
|
2019-10-06 00:07:16 +00:00
|
|
|
event: leave
|
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
|
|
|
condition:
|
2021-05-24 15:55:52 +00:00
|
|
|
- condition: time
|
|
|
|
after: "11:30:00"
|
|
|
|
weekday:
|
|
|
|
- mon
|
|
|
|
- tue
|
|
|
|
- wed
|
|
|
|
- thu
|
|
|
|
- fri
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.skylar_school
|
|
|
|
state: 'on'
|
2019-10-06 00:07:16 +00:00
|
|
|
action:
|
|
|
|
- service: input_boolean.turn_off
|
|
|
|
entity_id: input_boolean.skylar_school
|
2021-05-24 15:55:52 +00:00
|
|
|
- service: script.text_alert
|
|
|
|
data:
|
|
|
|
who: parents
|
|
|
|
message: "Skylar has been picked up from school."
|
2019-10-06 00:07:16 +00:00
|
|
|
initial_state: true
|
|
|
|
|
2019-07-14 21:02:31 +00:00
|
|
|
|
|
|
|
|
2019-07-14 01:38:53 +00:00
|
|
|
- id: jeff_arrives_summit
|
|
|
|
alias: Jeff Arrives At Summit
|
|
|
|
trigger:
|
2019-07-24 18:09:46 +00:00
|
|
|
- entity_id: person.jeffrey
|
2019-07-14 01:38:53 +00:00
|
|
|
event: enter
|
|
|
|
platform: zone
|
|
|
|
zone: zone.summit
|
|
|
|
action:
|
|
|
|
- service: script.text_notify
|
|
|
|
data:
|
|
|
|
who: "kat"
|
|
|
|
message: "Jeff has arrived at Summit"
|
|
|
|
initial_state: true
|
2019-07-14 21:02:31 +00:00
|
|
|
|
2019-07-14 01:38:53 +00:00
|
|
|
- id: jeff_arrives_summit_notification
|
|
|
|
alias: Notify Kat Jeff At Summit
|
|
|
|
trigger:
|
2019-07-24 18:09:46 +00:00
|
|
|
- entity_id: person.jeffrey
|
2019-07-14 01:38:53 +00:00
|
|
|
event: enter
|
|
|
|
platform: zone
|
|
|
|
zone: zone.summit
|
|
|
|
action:
|
|
|
|
- service: script.jeff_destination_na
|
|
|
|
initial_state: true
|
2019-07-14 21:02:31 +00:00
|
|
|
|
2019-07-14 01:38:53 +00:00
|
|
|
- id: jeff_leaves_summit
|
|
|
|
alias: Jeff Leaves Summit
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
2019-07-24 18:09:46 +00:00
|
|
|
- entity_id: person.jeffrey
|
2019-07-14 01:38:53 +00:00
|
|
|
event: leave
|
|
|
|
platform: zone
|
|
|
|
zone: zone.summit
|
|
|
|
action:
|
|
|
|
- service: input_boolean.turn_off
|
|
|
|
entity_id: input_boolean.jeff_traffic_alert_home
|
2019-07-14 21:02:31 +00:00
|
|
|
|
|
|
|
- id: welcome_home
|
|
|
|
alias: Welcome Home
|
2021-05-24 15:55:52 +00:00
|
|
|
mode: queued
|
2019-07-14 01:38:53 +00:00
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id:
|
2019-11-08 17:54:11 +00:00
|
|
|
- person.jeffrey
|
|
|
|
- person.katherine
|
2020-01-03 17:29:32 +00:00
|
|
|
- person.uncle_matt
|
|
|
|
- person.papa
|
2020-12-03 03:55:11 +00:00
|
|
|
- person.skylar
|
2019-07-14 01:38:53 +00:00
|
|
|
from: 'not_home'
|
|
|
|
to: 'home'
|
2021-05-24 15:55:52 +00:00
|
|
|
condition:
|
|
|
|
condition: state
|
|
|
|
entity_id: input_boolean.welcome_home
|
|
|
|
state: 'off'
|
2019-07-14 01:38:53 +00:00
|
|
|
action:
|
2020-12-03 03:55:11 +00:00
|
|
|
- service: group.set
|
|
|
|
data:
|
|
|
|
object_id: "arriving"
|
|
|
|
add_entities: >-
|
|
|
|
{{ trigger.to_state.entity_id }}
|
2021-05-24 15:55:52 +00:00
|
|
|
- delay: 00:03:00
|
|
|
|
- service: script.status_annc
|
2019-07-14 01:38:53 +00:00
|
|
|
data_template:
|
2021-05-24 15:55:52 +00:00
|
|
|
who: '{{ states.sensor.room_presence.state }}'
|
|
|
|
call_interuption: 1
|
|
|
|
speech_message: >
|
2020-12-03 03:55:11 +00:00
|
|
|
{% set person = expand('group.arriving')|map(attribute='name')|join(' and ') %}
|
|
|
|
{% set peoplecount = expand('group.arriving') | count %}
|
|
|
|
{% if peoplecount == 1 %}
|
|
|
|
{% set is_are = ' is ' %}
|
2020-12-13 01:52:01 +00:00
|
|
|
{% set has_have = ' has ' %}
|
2020-12-03 03:55:11 +00:00
|
|
|
{% else %}
|
|
|
|
{% set is_are = ' are ' %}
|
2020-12-13 01:52:01 +00:00
|
|
|
{% set has_have = ' have ' %}
|
2020-12-03 03:55:11 +00:00
|
|
|
{% endif %}
|
2021-01-02 18:20:07 +00:00
|
|
|
{%- macro greeting_sentence(person, is_are, has_have) -%}
|
2019-07-14 21:02:31 +00:00
|
|
|
{{ [
|
2020-12-13 01:52:01 +00:00
|
|
|
person ~ has_have + " arrived.",
|
2020-12-03 03:55:11 +00:00
|
|
|
person ~ is_are + " in the neighborhood.",
|
|
|
|
person ~ is_are + " arriving.",
|
2020-12-13 01:52:01 +00:00
|
|
|
"My sensors are picking up the presence of additional humans. " ~ person ~ has_have + " been identified as home.",
|
2020-03-18 02:54:04 +00:00
|
|
|
"Welcome back home " ~ person,
|
2020-12-03 03:55:11 +00:00
|
|
|
"Guess who is home?" ~ person ~ is_are,
|
2020-03-18 02:54:04 +00:00
|
|
|
"I am sensing a disturbance in the force. " ~ person +" must be home!",
|
2020-12-03 03:55:11 +00:00
|
|
|
person ~ is_are + "now in the house.",
|
2020-03-18 02:54:04 +00:00
|
|
|
person ~ "! You are home!",
|
2020-12-03 03:55:11 +00:00
|
|
|
person ~ is_are + " now here. Hash tag Welcome Home.",
|
|
|
|
person ~ is_are + " now here. Hash tag Home.",
|
|
|
|
"I know a secret! " ~ person ~ is_are +" home!",
|
2020-12-13 01:52:01 +00:00
|
|
|
"Just a quick announcement. " ~ person ~ has_have +" arrived!",
|
2020-12-03 03:55:11 +00:00
|
|
|
"Hey" ~ person + "! High Five! Glad you are finally home.",
|
2021-01-02 18:20:07 +00:00
|
|
|
"Just a quick announcement. " ~ person ~ has_have + " arrived!",
|
2020-12-13 01:52:01 +00:00
|
|
|
person ~ has_have + " finally made it home."
|
2019-07-14 21:02:31 +00:00
|
|
|
] | random }}
|
|
|
|
{%- endmacro -%}
|
2021-01-02 18:20:07 +00:00
|
|
|
{{greeting_sentence(person, is_are, has_have)}}
|
2021-05-24 15:55:52 +00:00
|
|
|
- delay: 00:02:00
|
2020-12-03 03:55:11 +00:00
|
|
|
- service: group.set
|
|
|
|
data:
|
|
|
|
object_id: "arriving"
|
|
|
|
entities: []
|
2019-07-14 21:02:31 +00:00
|
|
|
|
2020-01-03 17:29:32 +00:00
|
|
|
|
|
|
|
- id: guests_have_arrived
|
|
|
|
alias: Guests have arrived
|
|
|
|
trigger:
|
|
|
|
- entity_id: person.papa
|
|
|
|
event: enter
|
|
|
|
platform: zone
|
|
|
|
zone: zone.home
|
|
|
|
- entity_id: person.uncle_matt
|
|
|
|
event: enter
|
|
|
|
platform: zone
|
|
|
|
zone: zone.home
|
|
|
|
action:
|
|
|
|
- service: script.standby
|
|
|
|
- service: script.family_is_home
|
|
|
|
- service: input_boolean.turn_on
|
|
|
|
entity_id: input_boolean.guest_mode
|
|
|
|
initial_state: true
|
2019-07-24 18:09:46 +00:00
|
|
|
|
2020-06-12 20:02:42 +00:00
|
|
|
|
|
|
|
- id: disable_bad_traffic_home_jeff
|
|
|
|
alias: Disabling Jeff Bad Traffic Home
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: numeric_state
|
|
|
|
entity_id: sensor.jeff_ett_home
|
|
|
|
below: 40
|
|
|
|
- platform: state
|
|
|
|
entity_id: sensor.jeff_destination
|
|
|
|
to: Home
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.jeff_traffic_alert_home
|
|
|
|
state: 'on'
|
|
|
|
action:
|
|
|
|
- service: input_boolean.turn_off
|
|
|
|
entity_id: input_boolean.jeff_traffic_alert_home
|
|
|
|
|
2019-07-24 18:09:46 +00:00
|
|
|
script:
|
2020-11-07 16:20:26 +00:00
|
|
|
family_is_home:
|
|
|
|
sequence:
|
|
|
|
- condition: state
|
|
|
|
entity_id: sensor.family_status
|
|
|
|
state: Away
|
|
|
|
- service: script.standby
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: house/family/status
|
|
|
|
payload_template: Home
|
|
|
|
retain: true
|
2021-05-24 15:55:52 +00:00
|
|
|
- service: script.turn_on
|
|
|
|
entity_id: script.welcome_briefing
|
2020-11-07 16:20:26 +00:00
|
|
|
|
|
|
|
family_is_away:
|
|
|
|
sequence:
|
|
|
|
- condition: state
|
|
|
|
entity_id: sensor.family_status
|
|
|
|
state: Home
|
|
|
|
- service: script.appliances_off
|
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.lights_out
|
2021-01-02 18:20:07 +00:00
|
|
|
- service: input_boolean.turn_on
|
|
|
|
entity_id: input_boolean.sentry_mode
|
2020-11-07 16:20:26 +00:00
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.all_fans_off
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: house/family/status
|
|
|
|
payload_template: Away
|
|
|
|
retain: true
|
2021-05-24 15:55:52 +00:00
|
|
|
- service: input_boolean.turn_on
|
|
|
|
entity_id: input_boolean.welcome_home
|
2020-11-07 16:20:26 +00:00
|
|
|
|
2020-12-03 03:55:11 +00:00
|
|
|
reset_skylar_sensors:
|
|
|
|
sequence:
|
|
|
|
- delay: 02:00:00
|
|
|
|
- service: input_datetime.set_datetime
|
|
|
|
entity_id: input_datetime.skylar_awake_at
|
|
|
|
data:
|
|
|
|
time: "00:00:00"
|
|
|
|
- service: input_boolean.turn_off
|
|
|
|
entity_id: input_boolean.skylar_awake
|