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

53 lines
2.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- platform: template
sensors:
lock_01_keycode:
friendly_name: 'Lock Last Key Code'
value_template: >-
{% if states('sensor.lock_01_alarm_level') | int == 0 and states('sensor.lock_01_alarm_type') | int == 19 %}
Locked
{% elif states('sensor.lock_01_alarm_level') | int == 1 and states('sensor.lock_01_alarm_type') | int == 19 %}
Alex
{% elif states('sensor.lock_01_alarm_level') | int == 2 and states('sensor.lock_01_alarm_type') | int == 19 %}
Tanya
{% elif states('sensor.lock_01_alarm_level') | int == 3 and states('sensor.lock_01_alarm_type') | int == 19 %}
Maxim
{% endif %}
- platform: template
sensors:
lock_01_status:
friendly_name: 'Lock Status'
value_template: >-
{% if states('sensor.lock_01_alarm_type') | int == 17 %}
Lock Secured at Keypad Bolt Jammed (Not fully extended)
{% elif states('sensor.lock_01_alarm_type') | int == 18 %}
Lock Secured at Keypad Successful (Fully extended)
{% elif states('sensor.lock_01_alarm_type') | int == 21 %}
Lock Secured using Keyed cylinder or inside Thumb-Turn
{% elif states('sensor.lock_01_alarm_type') | int == 23 %}
Lock Secured by Controller Bolt Jammed (Not fully extended)
{% elif states('sensor.lock_01_alarm_type') | int == 24 %}
Lock Secured by Controller Successful (Fully extended)
{% elif states('sensor.lock_01_alarm_type') | int == 26 %}
Lock Auto Secured Bolt Jammed (Not fully extended)
{% elif states('sensor.lock_01_alarm_type') | int == 27 %}
Lock Auto Secured Successful (Fully extended)
{% elif states('sensor.lock_01_alarm_type') | int == 19 %}
Lock Un-Secured by User ({{ states('sensor.lock_01_alarm_level') | int }}) at Keypad
{% elif states('sensor.lock_01_alarm_type') | int == 22 %}
Lock Un-Secured using Keyed Cylinder or inside Thumb-Turn
{% elif states('sensor.lock_01_alarm_type') | int == 25 %}
Lock Un-Secured by Controller Successful (Fully retracted)
{% elif states('sensor.lock_01_alarm_type') | int == 161 %}
Failed User Code attempt at Keypad
{% elif states('sensor.lock_01_alarm_type') | int == 167 %}
Low Battery Level
{% elif states('sensor.lock_01_alarm_type') | int == 168 %}
Critical Battery Level
{% elif states('sensor.lock_01_alarm_type') | int == 169 %}
Battery Level too Low to operate lock
{% else %}
Unknown State
{% endif %}