Pass door unlock code to alarm panel (use lock.get_usercode value in call to service)

Tags: #<Tag:0x00007f3f17c75bc0>

I have a Schlage ZWave lock on the back door and am trying to pass the value of an unlock code to my alarm panel to disarm the alarm using the same code (instead of a generic one).

sensor.lock_back_door_deadbolt_alarm_level stores the code slot of the person who most recently unlocked the door, but it doesn’t store the actual code. I’m trying to do something like the following but I’m not sure if it’s possible (or if I just have the syntax wrong - lock is zwave node 5):

“entity_id”: “alarm_control_panel.home_alarm”,
“code”: lock.get_usercode { “node_id”: “5”, “code_slot”: sensor.lock_back_door_deadbolt_alarm_level }