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

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):

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

Not sure if you got your answer, because I’m looking at doing the same thing, but I wouldn’t try to pass the pin code, but have a trigger based on a code_slot unlocking that would disarm the alarm_control_panel.