Describe the bug
The function code_format tests self._code uses a regex to determine if it's a number or a text.
The code used it the one associated to the user configured in homeassistant (visual interface code).
However, I don't believe that the actual code is ever returned by the API (that would be strange, I suppose that the validation is done on the miniserver).
The funciton code_arm_required initializes self._code to "required".
The regex is not applied on the code but on the string required (or None if the block is not secured).
I don't have any good idea about how to solve that.
I don't think that Loxone can enforce numbers for the code (but I did not careful studied the API).
However, having code_format as NUMBER can be quite useful. Some devices like the "NSPanel" only support alarms with NUMBERS, not TEXT.
I used debug logs that the comparison is done on the string "required".
Firmware of your Miniserver
16.0.6.10
HomeAssistant install method
docker
Version of HomeAssistant
2025.07
Version of Pyloxone
See HA 2025.07
Update pyloxone
latest
Log
N/A
Describe the bug
The function
code_formattestsself._codeuses a regex to determine if it's a number or a text.The code used it the one associated to the user configured in homeassistant (visual interface code).
However, I don't believe that the actual code is ever returned by the API (that would be strange, I suppose that the validation is done on the miniserver).
The funciton
code_arm_requiredinitializesself._codeto "required".The regex is not applied on the code but on the string required (or
Noneif the block is not secured).I don't have any good idea about how to solve that.
I don't think that Loxone can enforce numbers for the code (but I did not careful studied the API).
However, having
code_formatas NUMBER can be quite useful. Some devices like the "NSPanel" only support alarms with NUMBERS, not TEXT.I used debug logs that the comparison is done on the string "required".
Firmware of your Miniserver
16.0.6.10
HomeAssistant install method
docker
Version of HomeAssistant
2025.07
Version of Pyloxone
See HA 2025.07
Update pyloxone
latest
Log
N/A