Initial version of presence detection automation

This commit is contained in:
2020-03-05 11:49:11 +02:00
parent 5a4d35c32f
commit f1c6d7a48c
+14 -7
View File
@@ -1,20 +1,27 @@
# When my state changes to "home", wait for 15 minutes for the door to be opened, and then mark me as home
- id: arrival_detecion
alias: Presence - Arrival Detection
trigger:
- platform: state
entity_id: binary_sensor.front_door_on_off
to: "on"
platform: state
entity_id: person.georgi
to: "home"
condition:
- condition: state
entity_id: input_boolean.georgi_home
state: "off"
condition: state
entity_id: input_boolean.georgi_home
state: "off"
action:
- service: script.telegram_say
data:
message: "Georgi is home"
message: "Device marked as home. Waiting for door to open!"
- wait_template: "{{ is_state('binary_sensor.front_door_on_off', 'on') }}"
continue_on_timeout: false
timeout: 00:15:00
- service: input_boolean.turn_on
entity_id: input_boolean.georgi_home
- service: script.telegram_say
data:
message: "Hey, I've marked you as home now!"
- id: leaving_home
alias: Presence - Leaving home