1
0

Automations for leave/arrive home

This commit is contained in:
Przemek Grondek 2022-04-20 00:49:00 +02:00
parent a461ff784e
commit 2f9cf78a31
3 changed files with 84 additions and 14 deletions

View File

@ -19,17 +19,3 @@
actions: actions:
- action: LOCK_DOOR - action: LOCK_DOOR
title: Lock door title: Lock door
- id: mobile_action-lock_door
alias: '[Mobile-action] Lock door'
description: ''
mode: single
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: LOCK_DOOR
action:
- service: lock.lock
target:
entity_id: lock.front_door_25f246fe_door_lock

View File

@ -0,0 +1,51 @@
- id: mobile_action-lock_door
alias: '[Mobile-action] Lock door'
description: ''
mode: single
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: LOCK_DOOR
action:
- service: lock.lock
target:
entity_id: lock.front_door_25f246fe_door_lock
- id: mobile_action-unlock_door
alias: '[Mobile-action] Unlock door'
description: ''
mode: single
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: UNLOCK_DOOR
action:
- service: lock.unlock
target:
entity_id: lock.front_door_25f246fe_door_lock
- id: mobile_action-leave_home
alias: '[Mobile-action] Leave home automation'
description: ''
mode: single
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: LEAVE_HOME
action:
- service: script.leave_home
- id: mobile_action-arrive_home
alias: '[Mobile-action] Arrive home automation'
description: ''
mode: single
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: ARRIVE_HOME
action:
- service: script.arrive_home

View File

@ -0,0 +1,33 @@
- id: presence-arrive
alias: '[Presence] Arrive Home'
trigger:
- platform: state
entity_id: person.przemek
to: home
action:
- service: notify.mobile_app_iphone_pg
data:
message: Arrive home
data:
actions:
- action: ARRIVE_HOME
title: Run automation
- action: UNLOCK_DOOR
title: Unlock door
- id: presence-leave
alias: '[Presence] Leave Home'
trigger:
- platform: state
entity_id: person.przemek
from: home
action:
- service: notify.mobile_app_iphone_pg
data:
message: You left home
data:
actions:
- action: LEAVE_HOME
title: Run automation
- action: LOCK_DOOR
title: Lock door