Last active
March 29, 2024 08:27
-
-
Save kai-zer-ru/182c148606cca7677d757c428dc21466 to your computer and use it in GitHub Desktop.
open_door_lock.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: Открытие двери | |
description: "" | |
trigger: | |
- platform: state | |
entity_id: | |
- sensor.0x54ef441000160cdb_lock_event | |
to: Doorbell is ringing | |
enabled: true | |
- platform: state | |
entity_id: | |
- sensor.0x54ef441000160cdb_lock_event | |
from: Unlocked with Fingerprint by user | |
to: The door is not closed | |
- platform: state | |
entity_id: | |
- sensor.0x54ef441000160cdb_lock_event | |
from: Unlocked with Keypad by user | |
to: The door is not closed | |
action: | |
- type: turn_on | |
device_id: 17ea0238b4c4b1af8e6665ecd3bcf778 | |
entity_id: switch.vykliuchatel_v_koridore_right | |
domain: switch | |
- service: input_text.set_value | |
data: | |
value: > | |
{% if (is_state('sensor.0x54ef441000160cdb_key_id', '123456') or | |
is_state('sensor.0x54ef441000160cdb_key_id', '123457')) %} | |
person.maksim | |
{% elif is_state('sensor.0x54ef441000160cdb_key_id','123458') %} | |
person.denis | |
{% elif is_state('sensor.0x54ef441000160cdb_key_id','1234569') %} | |
person.iuliia | |
{% elif is_state('sensor.0x54ef441000160cdb_key_id','unknown') %} null | |
{% else %} null {% endif %} | |
target: | |
entity_id: input_text.n100_last_username | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment