Integrating Schlage Lock with Z-Wave: Seeking Input on State Reporting

Hey everyone, I’ve been working on a template sensor to better integrate my Schlage lock with Home Assistant, and I’m curious if others have encountered similar issues or have suggestions. While the sensor works well for most states—like manual lock/unlock, keypad interactions, and jam detection—the HA-controlled states aren’t updating as expected. This means when the lock is engaged or disengaged via Home Assistant, the system doesn’t reflect that change, which is a bit frustrating for automation purposes.

I’ve been brainstorming a solution where, if the lock state changes (locked or unlocked), we could assume it was HA-controlled, even if the other values don’t update. I’d love to hear if anyone has implemented something similar or has insights on the best way to add this logic. Here’s the current sensor setup I’m working with:

yaml
front_door_report:
friendly_name: ‘Front Door Report’
value_template: >
{% set number = states(‘sensor.lock_front_door_deadbolt_alarm_level’) %}
{% set alarm_type_value = states(‘sensor.lock_front_door_deadbolt_alarm_type’) %}
{% set entity_id = ‘input_text.door_keypad_’ + number + ‘_name’ %}
{% set user = ‘Master’ if number == ‘0’ else states(entity_id) %}
{% set alarm_type_general_actions = { … } %}
{% set alarm_type_lock_actions = { … } %}
{% set alarm_type_code_actions = { … } %}
{% if alarm_type_value in alarm_type_code_actions %}
{{ alarm_type_code_actions[alarm_type_value] }} (Code {{ number}})
{% elif alarm_type_value in alarm_type_lock_actions %}
{{ alarm_type_lock_actions[alarm_type_value] }} with Code {{number }} ({{ user }})
{% elif alarm_type_value in alarm_type_general_actions %}
{{ alarm_type_general_actions[alarm_type_value] }}
{% else %}
Unknown Alarm Type Value {{ states(‘sensor.lock_front_door_deadbolt_alarm_type’) }}
{% endif %}

This is still in the early stages, but I’m hopeful the community can provide some guidance. Also, I suspect these values might be more standardized across Z-Wave locks, so if others have tested this with Yale or other brands, I’d love to hear about your experiences. Thanks in advance for any advice or insights!