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: >-
|
2019-07-24 18:09:46 +00:00
|
|
|
{%- if is_state('person.jeffrey', 'not_home') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
{%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %}
|
|
|
|
Flue Network
|
|
|
|
{%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %}
|
|
|
|
Flue Network
|
|
|
|
{% else %}
|
|
|
|
Lost
|
|
|
|
{%- endif %}
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.jeffrey', 'Sprouts') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Grocery Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.jeffrey', 'Kroger1') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Grocery Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.jeffrey', 'Kroger2') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Grocery Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.jeffrey', 'Home Depot') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Home Improvement Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.jeffrey', 'Lowes') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Home Improvement Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.jeffrey', 'Walmart') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Super Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.jeffrey', 'Target') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Super Store
|
|
|
|
{% else %}
|
2019-07-24 18:09:46 +00:00
|
|
|
{{ states.person.jeffrey.state }}
|
2019-07-12 20:35:11 +00:00
|
|
|
{%- endif %}
|
2019-07-14 01:38:53 +00:00
|
|
|
jeff_driving:
|
|
|
|
friendly_name: "Jeff' Driving"
|
|
|
|
unit_of_measurement: ''
|
|
|
|
value_template: >-
|
|
|
|
{%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %}
|
|
|
|
on
|
|
|
|
{% elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %}
|
|
|
|
on
|
|
|
|
{% else %}
|
|
|
|
off
|
|
|
|
{% endif %}
|
2019-07-12 20:35:11 +00:00
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
skylar_location:
|
|
|
|
friendly_name: "Skylar's Current Location"
|
|
|
|
unit_of_measurement: ''
|
|
|
|
value_template: >-
|
2019-10-06 00:07:16 +00:00
|
|
|
{%- if is_state('input_boolean.skylar_school', 'on')%}
|
|
|
|
school
|
|
|
|
{%- elif is_state('sensor.jeff_location', 'home') and is_state('sensor.kat_location', 'home') and is_state('input_boolean.skylar_school', 'off')%}
|
2019-07-12 20:35:11 +00:00
|
|
|
home
|
2019-10-06 00:07:16 +00:00
|
|
|
{%- elif is_state('sensor.jeff_location', 'Summit') and is_state('input_boolean.skylar_school', 'off')%}
|
|
|
|
{{ states.sensor.kat_location.state }}
|
|
|
|
{%- elif is_state('sensor.kat_location', 'Zoo Atlanta') and is_state('input_boolean.skylar_school', 'off')%}
|
|
|
|
{{ states.sensor.jeff_location.state }}
|
2019-07-12 20:35:11 +00:00
|
|
|
{% else %}
|
|
|
|
Mortal Peril
|
|
|
|
{%- endif %}
|
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
kat_location:
|
|
|
|
friendly_name: "Kat's Current Location"
|
|
|
|
unit_of_measurement: ''
|
|
|
|
value_template: >-
|
2019-07-24 18:09:46 +00:00
|
|
|
{%- if is_state('person.katherine', 'not_home') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
{%- if states.device_tracker.life360_kat_stone.attributes.moving == True %}
|
|
|
|
Flue Network
|
|
|
|
{% elif states.device_tracker.life360_kat_stone.attributes.driving == True %}
|
|
|
|
Flue Network
|
|
|
|
{% else %}
|
|
|
|
Lost
|
|
|
|
{%- endif %}
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.katherine', 'Sprouts') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Grocery Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.katherine', 'Kroger1') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Grocery Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.katherine', 'Kroger2') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Grocery Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.katherine', 'Home Depot') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Home Improvement Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.katherine', 'Lowes') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Home Improvement Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.katherine', 'Walmart') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Super Store
|
2019-07-24 18:09:46 +00:00
|
|
|
{% elif is_state('person.katherine', 'Target') %}
|
2019-07-12 20:35:11 +00:00
|
|
|
Super Store
|
|
|
|
{% else %}
|
2019-07-24 18:09:46 +00:00
|
|
|
{{ states.person.katherine.state }}
|
2019-07-12 20:35:11 +00:00
|
|
|
{%- endif %}
|
2019-07-14 01:38:53 +00:00
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
kat_driving:
|
|
|
|
friendly_name: "Kat Driving"
|
|
|
|
unit_of_measurement: ''
|
|
|
|
value_template: >-
|
|
|
|
{%- if states.device_tracker.life360_kat_stone.attributes.moving == True %}
|
|
|
|
'on'
|
|
|
|
{% elif states.device_tracker.life360_kat_stone.attributes.driving == True %}
|
|
|
|
'on'
|
|
|
|
{% else %}
|
|
|
|
'off'
|
|
|
|
{% endif %}
|
2019-07-12 20:35:11 +00:00
|
|
|
- platform: mqtt
|
|
|
|
name: "Family Status"
|
|
|
|
state_topic: "house/family/status"
|
|
|
|
payload_available: "online"
|
|
|
|
payload_not_available: "offline"
|
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
jeff_home:
|
|
|
|
value_template: >-
|
2020-04-24 18:37:47 +00:00
|
|
|
{{ is_state('device_tracker.jeffreys_iphone_8', 'home') or is_state('device_tracker.jeffreys_iphone_8_2', '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')
|
|
|
|
or is_state('device_tracker.life360_kat_stone', 'home') or is_state('device_tracker.iphone_2', 'home') }}
|
2019-07-12 20:35:11 +00:00
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
family_home:
|
|
|
|
value_template: >-
|
2020-04-24 18:37:47 +00:00
|
|
|
{{ is_state('device_tracker.jeffreys_iphone_8_2', 'home')
|
|
|
|
or is_state('device_tracker.jeffreys_iphone_8_2', 'home')
|
2019-07-12 20:35:11 +00:00
|
|
|
or is_state('device_tracker.life360_jeffrey_stone', 'home')
|
2020-04-24 18:37:47 +00:00
|
|
|
or is_state('device_tracker.iphone', 'home')
|
|
|
|
or is_state('device_tracker.iphone_2', 'home')
|
2019-07-12 20:35:11 +00:00
|
|
|
or is_state('device_tracker.life360_kat_stone', 'home')
|
|
|
|
or is_state('sensor.family_status', 'Home') }}
|
2019-07-14 01:38:53 +00:00
|
|
|
|
|
|
|
automation:
|
|
|
|
- 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
|
2020-09-29 00:01:58 +00:00
|
|
|
- wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}"
|
2019-07-14 21:02:31 +00:00
|
|
|
- service: script.ah_report
|
|
|
|
data:
|
2020-09-23 16:54:59 +00:00
|
|
|
speech_message: 'Kat has arrived at work.'
|
2019-07-14 21:02:31 +00:00
|
|
|
call_interuption: 1
|
|
|
|
|
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
|
2020-09-29 00:01:58 +00:00
|
|
|
- wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}"
|
2019-07-14 21:02:31 +00:00
|
|
|
- service: script.ah_report
|
|
|
|
data:
|
|
|
|
call_interuption: 1
|
|
|
|
call_kat_headed_home: 1
|
|
|
|
|
2019-07-14 01:38:53 +00:00
|
|
|
- id: '1550109528753'
|
|
|
|
alias: Jeff Is Heading Home
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: webhook
|
|
|
|
webhook_id: jeff_heading_home
|
|
|
|
condition: []
|
|
|
|
action:
|
|
|
|
- service: script.jeff_destination_home
|
2020-09-29 00:01:58 +00:00
|
|
|
- wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}"
|
2019-07-14 21:02:31 +00:00
|
|
|
- service: script.ah_report
|
|
|
|
data:
|
|
|
|
call_interurption: 1
|
|
|
|
call_jeff_headed_home: 1
|
2019-07-14 01:38:53 +00:00
|
|
|
|
2019-10-19 20:09:45 +00:00
|
|
|
- id: jeff_heading_to_work
|
|
|
|
alias: Jeff Is Heading To Work
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: webhook
|
|
|
|
webhook_id: jeff_heading_work
|
|
|
|
condition: []
|
|
|
|
action:
|
|
|
|
- service: script.jeff_destination_summit
|
|
|
|
|
2019-10-06 00:07:16 +00:00
|
|
|
- id: skylar_at_school
|
|
|
|
alias: Skylar is at School
|
|
|
|
trigger:
|
2019-10-13 20:05:54 +00:00
|
|
|
- entity_id: device_tracker.life360_jeffrey_stone
|
2019-10-06 00:07:16 +00:00
|
|
|
event: enter
|
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
2019-10-13 20:05:54 +00:00
|
|
|
- entity_id: device_tracker.life360_kat_stone
|
2019-10-06 00:07:16 +00:00
|
|
|
event: enter
|
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
|
|
|
condition:
|
|
|
|
condition: time
|
2019-10-13 20:05:54 +00:00
|
|
|
after: '07:25:00'
|
2019-10-06 00:07:16 +00:00
|
|
|
before: '08:30:00'
|
|
|
|
weekday:
|
|
|
|
- mon
|
|
|
|
- tue
|
|
|
|
- wed
|
|
|
|
- thu
|
|
|
|
- fri
|
|
|
|
action:
|
|
|
|
- service: input_boolean.turn_on
|
|
|
|
entity_id: input_boolean.skylar_school
|
2020-10-05 16:04:04 +00:00
|
|
|
- service: switch.turn_off
|
|
|
|
entity_id: switch.forest
|
2019-10-06 00:07:16 +00:00
|
|
|
initial_state: true
|
|
|
|
|
|
|
|
- id: skylar_left_school
|
|
|
|
alias: Skylar left School
|
|
|
|
trigger:
|
|
|
|
- entity_id: device_tracker.life360_jeffrey_stone
|
|
|
|
event: leave
|
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
|
|
|
- entity_id: device_tracker.life360_kat_stone
|
|
|
|
event: leave
|
|
|
|
platform: zone
|
|
|
|
zone: zone.starling
|
|
|
|
condition:
|
|
|
|
condition: time
|
|
|
|
after: '14:45:00'
|
|
|
|
before: '15:30:00'
|
|
|
|
weekday:
|
|
|
|
- mon
|
|
|
|
- tue
|
|
|
|
- wed
|
|
|
|
- thu
|
|
|
|
- fri
|
|
|
|
action:
|
|
|
|
- service: input_boolean.turn_off
|
|
|
|
entity_id: input_boolean.skylar_school
|
|
|
|
initial_state: true
|
|
|
|
|
2020-11-07 16:20:26 +00:00
|
|
|
#########################################################
|
2020-11-28 01:49:42 +00:00
|
|
|
# - id: family_has_arrived
|
|
|
|
# alias: Family Has arrived
|
|
|
|
# trigger:
|
|
|
|
# - platform: webhook
|
|
|
|
# webhook_id: home_webhook
|
|
|
|
# - entity_id: sensor.family_status
|
|
|
|
# from: Away
|
|
|
|
# platform: state
|
|
|
|
# to: Home
|
|
|
|
# - entity_id: group.family
|
|
|
|
# from: not_home
|
|
|
|
# platform: state
|
|
|
|
# to: home
|
|
|
|
# - entity_id: device_tracker.mal
|
|
|
|
# from: not_home
|
|
|
|
# platform: state
|
|
|
|
# to: home
|
|
|
|
# mode: single
|
|
|
|
# condition:
|
|
|
|
# - condition: state
|
|
|
|
# entity_id: sensor.family_status
|
|
|
|
# state: Away
|
|
|
|
# action:
|
|
|
|
# - service: script.family_is_home
|
|
|
|
# initial_state: true
|
2019-07-14 21:02:31 +00:00
|
|
|
|
2020-11-28 01:49:42 +00:00
|
|
|
# - id: family_has_left
|
|
|
|
# alias: Family Has Left
|
|
|
|
# initial_state: true
|
|
|
|
# trigger:
|
|
|
|
# - entity_id: sensor.family_status
|
|
|
|
# from: Home
|
|
|
|
# platform: state
|
|
|
|
# to: Away
|
|
|
|
# - platform: webhook
|
|
|
|
# webhook_id: away_webhook
|
|
|
|
# - entity_id: group.family
|
|
|
|
# from: home
|
|
|
|
# platform: state
|
|
|
|
# to: not_home
|
|
|
|
# mode: single
|
|
|
|
# condition:
|
|
|
|
# - condition: state
|
|
|
|
# entity_id: input_boolean.guest_mode
|
|
|
|
# state: 'off'
|
|
|
|
# action:
|
|
|
|
# - service: script.family_is_away
|
2020-11-07 16:20:26 +00:00
|
|
|
|
2020-11-28 01:49:42 +00:00
|
|
|
#########################################################
|
2020-11-07 16:20:26 +00:00
|
|
|
|
2020-11-28 01:49:42 +00:00
|
|
|
# - id: jeff_is_home
|
|
|
|
# alias: Jeff is Home
|
|
|
|
# initial_state: true
|
|
|
|
# trigger:
|
|
|
|
# - entity_id: person.jeffrey
|
|
|
|
# event: enter
|
|
|
|
# platform: zone
|
|
|
|
# zone: zone.home
|
|
|
|
# mode: single
|
|
|
|
# action:
|
|
|
|
# - service: script.family_is_home
|
|
|
|
# - service: script.jeff_destination_na
|
|
|
|
# - service: script.driveway_on
|
|
|
|
# - entity_id: input_boolean.jeff_travel_monitor
|
|
|
|
# service: input_boolean.turn_off
|
|
|
|
# - delay:
|
|
|
|
# minutes: 2
|
|
|
|
|
|
|
|
# - id: kat_is_home
|
|
|
|
# alias: Kat is Home
|
|
|
|
# initial_state: true
|
|
|
|
# trigger:
|
|
|
|
# - entity_id: person.katherine
|
|
|
|
# event: enter
|
|
|
|
# platform: zone
|
|
|
|
# zone: zone.home
|
|
|
|
# mode: single
|
|
|
|
# action:
|
|
|
|
# - service: script.family_is_home
|
|
|
|
# - service: script.driveway_on
|
|
|
|
# - service: input_boolean.turn_off
|
|
|
|
# entity_id: input_boolean.kat_travel_monitor
|
|
|
|
# - delay:
|
|
|
|
# minutes: 2
|
|
|
|
|
|
|
|
########################################################
|
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
|
|
|
|
2020-11-28 01:49:42 +00:00
|
|
|
|
2019-07-14 21:02:31 +00:00
|
|
|
|
|
|
|
- id: welcome_home
|
|
|
|
alias: Welcome Home
|
2020-11-14 15:27:35 +00:00
|
|
|
mode: queued
|
2020-11-28 01:49:42 +00:00
|
|
|
max: 4
|
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
|
2019-07-14 01:38:53 +00:00
|
|
|
from: 'not_home'
|
|
|
|
to: 'home'
|
2019-09-07 19:11:00 +00:00
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: sensor.family_status
|
|
|
|
state: Home
|
2019-07-14 01:38:53 +00:00
|
|
|
action:
|
2020-11-28 01:49:42 +00:00
|
|
|
- service: script.family_is_home
|
|
|
|
# - wait_template: >-
|
|
|
|
# {{ states.binary_sensor.laundry_room_door.state == 'on' }}
|
|
|
|
- delay: 00:02:00
|
2019-07-14 21:02:31 +00:00
|
|
|
- service: script.ah_report
|
2019-07-14 01:38:53 +00:00
|
|
|
data_template:
|
2020-01-03 17:29:32 +00:00
|
|
|
call_interuption: 1
|
2019-07-14 21:02:31 +00:00
|
|
|
welcome_home: >
|
|
|
|
{% set person = trigger.to_state.attributes.friendly_name %}
|
|
|
|
{%- macro greeting_sentence(person) -%}
|
|
|
|
{{ [
|
|
|
|
person + " has arrived.",
|
|
|
|
person + " is in the neighborhood.",
|
|
|
|
person + " is arriving.",
|
|
|
|
"My sensors are picking up the presence of additional humans. " ~ person +" has been identified as home.",
|
2020-03-18 02:54:04 +00:00
|
|
|
"Welcome back home " ~ person,
|
|
|
|
"Guess who is home?" ~ person +" is!",
|
|
|
|
"I am sensing a disturbance in the force. " ~ person +" must be home!",
|
|
|
|
person + " is now in the house.",
|
|
|
|
person ~ "! You are home!",
|
|
|
|
"I know a secret! " ~ person +" is home!",
|
2019-07-14 21:02:31 +00:00
|
|
|
person + " has finally made it home."
|
|
|
|
] | random }}
|
|
|
|
{%- endmacro -%}
|
|
|
|
{{greeting_sentence(person)}}
|
|
|
|
|
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
|
|
|
|
|
2020-11-07 16:20:26 +00:00
|
|
|
# - id: '1550107919204'
|
|
|
|
# alias: Family Is Home
|
|
|
|
# trigger:
|
|
|
|
# - platform: webhook
|
|
|
|
# webhook_id: home_webhook
|
|
|
|
# - entity_id: group.family
|
|
|
|
# from: not_home
|
|
|
|
# platform: state
|
|
|
|
# to: home
|
|
|
|
# condition: []
|
|
|
|
# action:
|
|
|
|
# - service: script.family_is_home
|
|
|
|
|
|
|
|
# - id: '1550108034209'
|
|
|
|
# alias: Family Is Away
|
|
|
|
# trigger:
|
|
|
|
# - platform: webhook
|
|
|
|
# webhook_id: away_webhook
|
|
|
|
# - entity_id: group.family
|
|
|
|
# from: home
|
|
|
|
# platform: state
|
|
|
|
# to: not_home
|
|
|
|
# condition: []
|
|
|
|
# action:
|
|
|
|
# - service: script.family_is_away
|
2020-06-12 20:02:42 +00:00
|
|
|
|
|
|
|
|
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: script.washer_finished_notification_audible
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: house/family/status
|
|
|
|
payload_template: Home
|
|
|
|
retain: true
|
|
|
|
|
|
|
|
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
|
|
|
|
- service: script.security_check_garage
|
|
|
|
- service: script.security_check_zones
|
|
|
|
- service: script.lockdown
|
|
|
|
- service: script.lockdown_issue
|
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.all_fans_off
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: house/family/status
|
|
|
|
payload_template: Away
|
|
|
|
retain: true
|
|
|
|
|
|
|
|
|
2019-07-24 18:09:46 +00:00
|
|
|
jeff_destination_zoo:
|
|
|
|
sequence:
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: jeff/driving/destination
|
|
|
|
payload: Zoo
|
|
|
|
retain: true
|
|
|
|
jeff_destination_summit:
|
|
|
|
sequence:
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: jeff/driving/destination
|
|
|
|
payload: Summit
|
|
|
|
retain: true
|
|
|
|
jeff_destination_none:
|
|
|
|
sequence:
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: jeff/driving/destination
|
|
|
|
payload: none
|
|
|
|
retain: true
|
|
|
|
jeff_destination_na:
|
|
|
|
sequence:
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: jeff/driving/destination
|
|
|
|
payload: na
|
|
|
|
retain: true
|
|
|
|
jeff_destination_home:
|
|
|
|
sequence:
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: jeff/driving/destination
|
|
|
|
payload: Home
|
|
|
|
retain: true
|
|
|
|
jeff_destination_harbins:
|
|
|
|
sequence:
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: jeff/driving/destination
|
|
|
|
payload: Harbins
|
|
|
|
retain: true
|
|
|
|
kat_destination_na:
|
|
|
|
sequence:
|
|
|
|
- service: mqtt.publish
|
|
|
|
data:
|
|
|
|
topic: kat/driving/destination
|
|
|
|
payload: na
|
2019-10-06 00:07:16 +00:00
|
|
|
retain: true
|