Reworking presence automations

This commit is contained in:
Jeffrey Stone 2018-03-09 11:52:06 -05:00
parent 84a0f0665f
commit 3f115fe085
4 changed files with 29 additions and 67 deletions

View File

@ -47,38 +47,25 @@
action: action:
- service: script.family_is_home - service: script.family_is_home
#- alias: Family Devices Have Left # - alias: Jeff Arrives Home
# trigger: # trigger:
# - entity_id: group.family # # - entity_id: device_tracker.owntracks_jeffreystonesiphone
# from: home # # event: enter
# platform: state # # platform: zone
# to: not_home # # zone: zone.home
# condition: # - entity_id: sensor.jeff_presence
# - condition: state # from: 'not present'
# entity_id: sensor.family_status # platform: state
# state: 'home' # to: 'present'
# action: # action:
# - service: script.family_is_away # - service: script.jeff_destination_arrived
# - service: script.driveway_on
- alias: Jeff Arrives Home # - service: input_boolean.turn_off
trigger: # entity_id: input_boolean.jeff_heading_home
# - entity_id: device_tracker.owntracks_jeffreystonesiphone
# event: enter
# platform: zone
# zone: zone.home
- entity_id: sensor.jeff_presence
from: 'not present'
platform: state
to: 'present'
action:
- service: script.jeff_destination_arrived
- service: script.driveway_on
- service: input_boolean.turn_off
entity_id: input_boolean.jeff_heading_home
- alias: Jeff Arrives At Summit - alias: Jeff Arrives At Summit
trigger: trigger:
- entity_id: device_tracker.owntracks_jeffreystonesiphone - entity_id: device_tracker.jeffrey_377fadfe9d7e410fb71bd84c06547c00
event: enter event: enter
platform: zone platform: zone
zone: zone.summit zone: zone.summit
@ -88,7 +75,7 @@
- alias: Kat Arrives Home Notification - alias: Kat Arrives Home Notification
trigger: trigger:
- entity_id: device_tracker.katherinestonesiphone - entity_id: device_tracker.kat_2f1c672110dd491ea7dca9833d1c6cf5
event: enter event: enter
platform: zone platform: zone
zone: zone.home zone: zone.home
@ -103,7 +90,7 @@
- platform: zone - platform: zone
event: enter event: enter
zone: zone.zoo_atlanta zone: zone.zoo_atlanta
entity_id: device_tracker.katherinestonesiphone entity_id: device_tracker.kat_2f1c672110dd491ea7dca9833d1c6cf5
condition: condition:
- condition: state - condition: state
entity_id: input_boolean.text_notify_jeff entity_id: input_boolean.text_notify_jeff
@ -118,14 +105,11 @@
- platform: zone - platform: zone
event: leave event: leave
zone: zone.zoo_atlanta zone: zone.zoo_atlanta
entity_id: device_tracker.katherinestonesiphone entity_id: device_tracker.kat_2f1c672110dd491ea7dca9833d1c6cf5
condition: condition:
- condition: state - condition: state
entity_id: input_boolean.text_notify_jeff entity_id: input_boolean.text_notify_jeff
state: 'on' state: 'on'
action: action:
#- service: notify.ios_jeffreystonesiphone
# data:
# message: Kat left Zoo Atlanta
- service: input_boolean.turn_on - service: input_boolean.turn_on
entity_id: input_boolean.kat_heading_home entity_id: input_boolean.kat_heading_home

View File

@ -10,38 +10,6 @@
entity_id: sensor.jeff_destination entity_id: sensor.jeff_destination
to: Home to: Home
action: action:
# - service: notify.ios_katherinestonesiphone
# data:
# message: Jeff will be home in {{states.sensor.jeff_ett_home.attributes.duration_in_traffic}}.
- service: input_boolean.turn_on - service: input_boolean.turn_on
entity_id: input_boolean.jeff_heading_home entity_id: input_boolean.jeff_heading_home
- alias: Jeff no destination
trigger:
- platform: state
entity_id: sensor.jeff_status
to: 'moving'
condition:
- condition: state
entity_id: sensor.jeff_destination
state: Arrived
action:
- service: script.jeff_destination_na
- alias: Jeff is stationary
trigger:
- platform: numeric_state
entity_id: sensor.jeff_velocity
below: 1
action:
- service: script.jeff_is_stationary
- alias: Jeff is moving
trigger:
- platform: numeric_state
entity_id: sensor.jeff_velocity
above: 0
action:
- service: script.jeff_is_moving

View File

@ -0,0 +1,7 @@
jeff_is_home:
sequence:
- service: script.jeff_destination_arrived
- service: script.driveway_on
- service: input_boolean.turn_off
entity_id: input_boolean.jeff_heading_home
- service: script.jeff_is_home_audible

View File

@ -3,6 +3,9 @@ kat_is_home_audible:
- condition: state - condition: state
entity_id: input_boolean.audible_notifications entity_id: input_boolean.audible_notifications
state: "on" state: "on"
- condition: state
entity_id: sensor.jeff_presence
state: 'present'
- service: tts.google_say - service: tts.google_say
data: data:
entity_id: media_player.hass_speaker entity_id: media_player.hass_speaker