hmm.. thats interesting.. the input fields are in a different order in your screenshot compared to my install:
The function that sets the code needs those parameters in a specific order (code position, pin code, name), like seen in my screenshot, which would be reasonable that you are getting the error because its expecting an integer and its getting a string.
Which version of the virtual keypad are you using.. the "virtual keypad" (with the app to manage settings) or the "virtual basic keypad"? was this installed from HPM or installed manually?
I wonder if trying to use the Lock Code Manager app to set/manage the pins would work as that should format the data correctly for the function to handle. (at least this could be used until the root issue is resolved).
edit.. what HE version are you on? im still running 2.2.3.148, so I cannot comment on 2.2.4.xx yet as far as if something changed with the built in Lock Codes capability
edit2.. here is the hubitat documentation for the Lock Codes capability, which shows how it looks on my end, and how it was implemented in the driver:
Hubitat Documentation
link: Driver Capability List - Hubitat Documentation
LockCodes
Device Selector
capability.lockCodes
Driver Definition
capability "LockCodes"
Attributes
codeChanged
- ENUM ["added", "changed", "deleted", "failed"]
codeLength
- NUMBER
lockCodes
- JSON_OBJECT
maxCodes
- NUMBER
Commands
deleteCode(codeposition)
codeposition required (NUMBER) - Code position number to delete
getCodes()
setCode(codeposition, pincode, name)
codeposition required (NUMBER) - Code position number
pincode required (STRING) - Numeric PIN code
name optional (STRING) - Name for this lock code
setCodeLength(pincodelength)
pincodelength required (NUMBER) - Maximum pin code lentgh for this lock