1
0
ansible-home-assistant/roles/automations/files/nfc.yaml

27 lines
792 B
YAML
Raw Permalink Normal View History

- id: nfc_frontdoor
2022-02-21 22:10:40 +00:00
alias: '[NFC] Front door'
trigger:
- platform: tag
tag_id: 404bfd9a-36d4-4571-a52e-210daafbf138
action:
- choose:
- conditions:
- condition: state
2022-10-20 17:11:59 +00:00
entity_id: lock.front_door_lock_doorlock
2022-02-21 22:10:40 +00:00
state: unlocked
sequence:
- service: lock.lock
target:
2022-10-20 17:11:59 +00:00
entity_id: lock.front_door_lock_doorlock
2022-02-21 22:10:40 +00:00
- service: script.leave_home
- conditions:
- condition: state
2022-10-20 17:11:59 +00:00
entity_id: lock.front_door_lock_doorlock
2022-02-21 22:10:40 +00:00
state: locked
sequence:
- service: lock.unlock
target:
2022-10-20 17:11:59 +00:00
entity_id: lock.front_door_lock_doorlock
2022-02-21 22:10:40 +00:00
- service: script.arrive_home
mode: single