mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-21 02:47:44 +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
|
- id: arrival_detecion
|
||||||
alias: Presence - Arrival Detection
|
alias: Presence - Arrival Detection
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
platform: state
|
||||||
entity_id: binary_sensor.front_door_on_off
|
entity_id: person.georgi
|
||||||
to: "on"
|
to: "home"
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
condition: state
|
||||||
entity_id: input_boolean.georgi_home
|
entity_id: input_boolean.georgi_home
|
||||||
state: "off"
|
state: "off"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: script.telegram_say
|
- service: script.telegram_say
|
||||||
data:
|
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
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.georgi_home
|
entity_id: input_boolean.georgi_home
|
||||||
|
- service: script.telegram_say
|
||||||
|
data:
|
||||||
|
message: "Hey, I've marked you as home now!"
|
||||||
|
|
||||||
- id: leaving_home
|
- id: leaving_home
|
||||||
alias: Presence - Leaving home
|
alias: Presence - Leaving home
|
||||||
|
|||||||
Reference in New Issue
Block a user