Hi all,
I’m trying to set up a template lock in HA for a Schlage Encode Plus lock added to HomeKit by following this excellent guide. The code I have is linked below.
Template lock:
lock:
- platform: template
name: Entryway Door Lock
value_template: "{{ is_state('input_boolean.entryway_door_lock_status', 'on') }}"
unlock:
service: input_boolean.turn_on
data:
entity_id: input_boolean.entryway_door_lock_unlock_action
lock:
service: input_boolean.turn_on
data:
entity_id: input_boolean.entryway_door_lock_lock_action
Input Booleans:
The details of why the lock is configured this way is included in the link above. TLDR; it is to “manually” sync the lock between Apple Home and HA.
Everything works perfectly except for some reason, the state of the template lock is always “off”.
I confirmed in the Developer tools that the input_boolean.entryway_door_lock_status
is changing from on
to off
as expected when locking and unlocking the lock.
It seems the template lock is not actually listening the state change events for input_boolean.entryway_door_lock_status
? The Logbook for the template lock is also empty.
Am I missing something? Any help would be appreciated.
Thanks,
Mac