Stepper widget with step size bug?

I do have an item:
Number GaerAutomatSoll “Gärautomat Soll” (gGaerautomat, gEG_Kueche) [“Oven”, “Setpiont”] {
listWidget=“oh-stepper-item” [raised=“true”,step=“0.5”, min=“25”, max=“35”],
channel=“mqtt:topic:Gaerautomat:Channel_SollTemperatur” , expire=“6h”
}

That gives me a nice stepper widget. When I hit the “-”, the value decreases with 0.5 step size. When I hit the “+”, the value jumps to the max value. Can anyone confirm this behaviour ? Happens in mainUI under Android and also with Firefox under Linux.

Yep, I can confirm too, but it’s because you’re using strings instead of numbers to define the step.

With the following configuration:

Number nSetpointTarget "Thermostat setpoint" <temperature> (gThermostat) ["Setpoint","Temperature"] { channel="http:url:thermostat:SetpointTarget", listWidget="oh-stepper-item"[min="16", max="21"] }

everything works as expected:

Peek 2021-01-10 19-33

Adding a step attribute:

Number nSetpointTarget "Thermostat setpoint" <temperature> (gThermostat) ["Setpoint","Temperature"] { channel="http:url:thermostat:SetpointTarget", listWidget="oh-stepper-item"[min="16", max="21", step="1"] }

behaviour as you described:

Peek 2021-01-10 19-34

However, if you use numbers rather than strings to define the attributes, you should find that it works:

Number nSetpointTarget "Thermostat setpoint" <temperature> (gThermostat) ["Setpoint","Temperature"] { channel="http:url:thermostat:SetpointTarget", listWidget="oh-stepper-item"[min=16, max=21, step=1] }

Thanks. No quotes did the trick. Its not a string… Should have figured that one myself.

However, in [OH3] Add metadata to Items via configuration files you use the step parameter with quotes most of the time. Maybe you should address that there too.

Not for the widget configuration I don’t - you’ll notice I only use a string for the stateDescription's step.

It’s definitely a subtlety, and I have no idea why it has to be this way. I should probably make a note in that tutorial…

Ah, you’re right. I wasn’t aware of the stateDescription in the first place. Google didn’t find too much about it but I guess its somewhere between input plausibility check and the map feature. I will leave that for tomorrow…