Files
hassio-configuration/configuration/automation/lock_lock.yaml
2025-02-07 12:46:24 -05:00

25 lines
674 B
YAML

---
- alias: "[Lock] Lock A Lock if Unlocked for 3 Minutes"
id: "X7P04E2U6FABYRSZ"
initial_state: "true"
trigger:
- platform: state
entity_id: lock.lock_01
to: "unlocked"
for:
hours: 0
minutes: 3
seconds: 0
condition:
- condition: template
value_template: "{{ states('binary_sensor.door_entrance_01') == 'off' }}"
action:
- service: lock.lock
data:
entity_id: lock.lock_01
# - service: persistent_notification.create
# data:
# message: "Lock is being locked by automation"
- service: notify.telegram_alex
data:
message: "Lock is being locked by automation"