Textual widget definition

Hi,

I have a strange behaviour in my oh-stepper-card and oh-stepper-item widgets. Every time I press the plus button the item changes to the max value. After that the minus button works as exspected and changes the item in the steps given in widget configuration.

Does anyone had this behaviour?
Does anyone have a guess how to resolve this?

I’m on openHAB 3.1.0 Release Build

here is my configuration of the item:

Group Thermostat_Arbeitszimmer "Thermostat Arbeitszimmer" 
  (Arbeitszimmer)
  ["RadiatorControl", "Thermostat"]
  Number:Temperature Thermostat_Arbeitszimmer_Setpoint "Thermostat Arbeitszimmer Soll [%.1f °C]" <heating>
    (Thermostat_Arbeitszimmer, Thermostate)
    ["Setpoint", "Temperature", "TargetTemperature"] 
    { channel="zwave:device:controller:node38:thermostat_setpoint_heating",
      stateDescription=" "[
        pattern="%.1f °C"
      ],
      widget="oh-stepper-card"[
        min="5.0",
        max="25.0",
        step="0.5"
      ],
      listWidget="oh-stepper-item"[
        min="5.0",
        max="25.0",
        step="0.5"
      ]
    }
  Number Thermostat_Arbeitszimmer_Battery  "Batterie Thermostat Arbeitszimmer [%.1f %%]" <batterylevel>
    (Thermostat_Arbeitszimmer, Batterie)
    ["Status", "Energy"]
    {channel="zwave:device:controller:node38:battery-level"}

now I’m on openhab 3.2M4 but the described behavior still happens. :neutral_face:

What command actually gets sent to the Item? What does the Item state do in response? Check your events.log (The binding/device may have an influence here)

I do not think it depends on the binding. I changed my thermostats from zwave to zigbee and the problem persists.

if the stepper-card ‘+’ is clicked, the log shows the item changed to 25 °C and I hear the thermostat opens.

Would you share that too?

14:26:11.611 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Thermostat_Arbeitszimmer_Setpoint' received command 25
14:26:14.030 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Thermostat_Arbeitszimmer_Setpoint' changed from 22 °C to 25 °C

as told it receives the command and it changes

Okay, that’s good.
We can see the Item had a valid state before you started (22 °C) but that the widget has sent an inappropriate command to the Item. Just 25, not 25 °C.
Looks like a widget bug.

I don’t know enough about the widget to say if min/max/step should be defined with or without units, probably without, but wonder if there is a UoM connection. Try with none at all specified, see if the defaults work.

I think the stepper widget has a unit parameter, maybe you just need to configure that.

ok… the default seems to work as expected.

this is my configuration for the item:

Group Thermostat_Arbeitszimmer "Thermostat Arbeitszimmer" 
  (Arbeitszimmer)
  ["RadiatorControl", "Thermostat"]
  Number:Temperature Thermostat_Arbeitszimmer_Setpoint "Thermostat Arbeitszimmer Soll [%.1f °C]" <heating>
    (Thermostat_Arbeitszimmer, Thermostate)
    ["Setpoint", "Temperature", "TargetTemperature"] 
    { channel="zigbee:device:controller:00158d0000000000:00158D0000000000_1_thermostatoccupiedheating",
      widget="oh-stepper-card",
      listWidget="oh-stepper-item"
    }

Alright, so maybe the widget just messes up its maths when it encounters a state with units that it didn’t expect. Try again with additional param
unit: "°C"

GUI users probably get that autocompleted.

I am having the same problem. I’ve thrown all of the parameters I know at it:

Number:Temperature setpointHeatOccupied           "Global Heat setpoint when scheduled [%d °F]" (gHVAC)["Setpoint","Temperature"]{
                stateDescription=" "[min="60",max="75",step="1",pattern="%d °F",unit="°F"],
        listWidget="oh-stepper-item"[min="60",max="75",step="1",pattern="%d °F",unit="°F"],
            widget="oh-stepper-card"[min="60",max="75",step="1",pattern="%d °F",unit="°F"],
        listWidget="oh-stepper-item"[min="60",max="75",step="1",pattern="%d °F",unit="°F"],
        cellWidget="oh-stepper-cell"[min="60",max="75",step="1",pattern="%d °F",unit="°F"]
        }

This is an items file.

For some reason, that test did not work. I have it working now with this configuration:

Number:Temperature setpointHeatOccupied "Global Heat setpoint when scheduled [%d °F]" (gHVAC)["Setpoint","Temperature"]{stateDescription=" "[min="60",max="75",step="1",pattern="%d °F",unit="°F"]}     

I’m not sure if the pattern is required.