Yes, 44 and 45 are the node ids of my front and back door locks.
Your automations would not work because you are not referencing an entity_id to perform the action on, which, in your case, I believe would be lock.kwikset_touchpad_electronic_deadbolt_locked_4
Try this automation instead:
automation:
- alias: 'Sync Lock/Unlock State'
trigger:
platform: state
entity_id: sensor.kwikset_touchpad_electronic_deadbolt_alarm_type_4
action:
service_template: >
{%- if ( (trigger.to_state.state == "19") or
(trigger.to_state.state == "22") or
(trigger.to_state.state == "25") )
-%}
lock.unlock
{%- else -%}
lock.lock
{% endif %}
entity_id: lock.kwikset_touchpad_electronic_deadbolt_locked_4
I have not tested this code myself, since I have moved all of my internal automations over to AppDaemon and Node-Red, so mine are all written in python and javascript now, but this should work. If you have any problems, let me know any errors or anything and I’ll see if I can figure out what is wrong.
The code is shorter by allowing the locking to occur simply if it does not match the unlock codes, but also, I am sure there are other codes sent by the lock for different scenarios that I am unaware of, such as if someone attempted to force the lock open, so to be on the safe side, you want to explicitly reference the unlock codes and not the lock codes, that way you ensure your door will ONLY ever unlock with those 3 codes.
As for this lock working correctly with Wink, keep in mind that Wink, SmartThings and all of the other commercially available Hubs have very detailed internal profiles for know devices, such as those by large companies like Kwikset, so a lot of the backend stuff is hidden from you, so to the end user, it just appears to work, but in reality, Wink has a lot of code specific to certain devices to ensure statuses are updated, such as monitoring the internal alarm sensors as we are doing manually here.
Home Assistant, on the other hand, being very DIY, does not do all of the work for you, so we end up having to do it ourselves through code, while Wink is most likely doing this behind the curtain so that everything just works like plug and play to the end user.