mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-17 01:52:58 +00:00
Initial version of presence detection automation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user