Hi there! I’m using openHAB 2.5.1 and I’m running into an issue that I need help understanding. I’m setting up an MQTT bridge thing for a Z-Wave dimmer switch, specifically the Qubino Flush Dimmer (ZMNHDA2). Here’s how my configuration looks:
plaintext
Type dimmer : Dimlevel “Level (38-1-0)” [ stateTopic=“zwave/rum-3/takbelysning/level”, transformationPattern=“JSONPATH:$.value”, commandTopic=“zwave/rum-3/takbelysning/level/set”, min=3, max=100, step=1 ]
When I save the configuration, I get the error: Command '0' not supported by type 'PercentageValue': Value must be between 0 and 100. It seems like JSONPATH is returning a string instead of a number for the dimmer channel. My JSON data from the MQTT topic is:
{
“time”: 1583054505111,
“value”: 0
}
I tried modifying the transformation pattern by adding JS:parseInt.js to parse the value as an integer, but the error persists. The parseInt.js function I’m using is:
javascript
(function(b) { return parseInt(b); })(input)
Any ideas on how to fix this issue? I’m really stuck and would appreciate any guidance. Thanks in advance! ![]()