Stepper with kind of debounce needed

  • Platform information:
    • Hardware: amd64
    • OS: debian 11
    • Java Runtime Environment: openjdk
    • openHAB version: 3.4.0~M1-1
  • Issue of the topic:
    User can click multiple times on oh-stepper-item within a second in UI but I would like to trigger the rule only after last click/change and not with every click.
Number:Temperature mbedroom_target_temperature "Master Bedroom Target Temperature [%.1f °C]" <temperature> (gMBedroom,gRoomTargetTemperature) ["Setpoint","Temperature"] {
    listWidget="oh-stepper-item" [ min=4, max=31, step=0.5, autorepeat=true]
}

You can’t get exactly what you want with a stepper widget. You might be able to with a slider though. If a slider won’t work, you’ll have to implement something like Debounce which is a rule template you can install from the marketplace. You’ll need two Items, one that is on your UI and the second one that gets the debounced value only after it stops changing for the configured amount of time.

Thanks, I’ll try to implement something like Debounce first and will fallback to slider if not successful

Adding note to myself (and others) to see how it was implemented in the code for slider: