Files
Alexander Savin 26d86dec90
Some checks failed
Savin's Home Assistant / build (push) Failing after 1m45s
Update to the current version
2025-05-11 16:07:21 -04:00

32 lines
933 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: telegram_bot.send_message
data:
target: "-1002338954143"
message_thread_id: 3
message_tag: night_mode_finished
title: "[Home Assistant] Security"
message: 'Lock is being locked by automation'
# - service: persistent_notification.create
# data:
# message: "Lock is being locked by automation"
# - service: notify.telegram_alex
# data:
# message: "Lock is being locked by automation"