2023-06-12 21:56:22 +00:00
|
|
|
- id: vacation_door_lock
|
2022-06-05 19:55:50 +00:00
|
|
|
alias: "[Alarm] Door relock"
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id:
|
2022-10-20 17:11:59 +00:00
|
|
|
- lock.front_door_lock_doorlock
|
2022-06-05 19:55:50 +00:00
|
|
|
to: unlocked
|
|
|
|
condition:
|
|
|
|
- condition: not
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: alarm_control_panel.home_alarm
|
|
|
|
state: disarmed
|
|
|
|
action:
|
2022-10-19 20:25:52 +00:00
|
|
|
- service: notify.mobile_app_iphone
|
2022-06-05 19:55:50 +00:00
|
|
|
data:
|
|
|
|
title: "Door unlocked!"
|
|
|
|
message: Front door was unlocked, trying to lock it back
|
|
|
|
- choose:
|
|
|
|
- conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: binary_sensor.front_door_open_close
|
|
|
|
state: 'on'
|
|
|
|
sequence:
|
|
|
|
- wait_for_trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.front_door_open_close
|
|
|
|
to: 'off'
|
|
|
|
- repeat:
|
|
|
|
until:
|
|
|
|
- condition: state
|
2022-10-20 17:11:59 +00:00
|
|
|
entity_id: lock.front_door_lock_doorlock
|
2022-06-05 19:55:50 +00:00
|
|
|
state: locked
|
|
|
|
sequence:
|
|
|
|
- service: lock.lock
|
|
|
|
target:
|
2022-10-20 17:11:59 +00:00
|
|
|
entity_id: lock.front_door_lock_doorlock
|
2022-10-19 20:25:52 +00:00
|
|
|
- service: notify.mobile_app_iphone
|
2022-06-05 19:55:50 +00:00
|
|
|
data:
|
|
|
|
title: "Door locked back"
|
|
|
|
message: Front door was successfully locked
|
|
|
|
mode: single
|