Skip to content

Commit 2c3ff5a

Browse files
committed
Expect listed types
1 parent 7cec25c commit 2c3ff5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

zwave_js_server/util/lock.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,16 @@ async def set_usercode(
143143
) -> SetValueResult | None:
144144
"""Set the usercode to index X on the lock."""
145145
value = get_code_slot_value(node, code_slot, LOCK_USERCODE_PROPERTY)
146-
return await node.async_set_value(value, str(usercode))
146+
return await node.async_set_value(value, usercode)
147147

148148

149149
async def set_usercodes(node: Node, codes: dict[int, str]) -> SupervisionResult | None:
150150
"""Set the usercode to index X on the lock."""
151151
cc_api_codes = [
152152
{
153-
LOCK_USERCODE_ID_PROPERTY: int(code_slot),
153+
LOCK_USERCODE_ID_PROPERTY: code_slot,
154154
LOCK_USERCODE_STATUS_PROPERTY: CodeSlotStatus.ENABLED,
155-
LOCK_USERCODE_PROPERTY: str(usercode),
155+
LOCK_USERCODE_PROPERTY: usercode,
156156
}
157157
for code_slot, usercode in codes.items()
158158
]

0 commit comments

Comments
 (0)