problem:
If I use a simple configuration of a slider, min- and max-values are ignored. Sliding to a value above the max-value results in:
[ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.mqtt.generic.internal.handler.GenericMQTTThingHandler@1210a777': 63 is out of range
excerpt of configurations:
#widget:
- component: oh-slider-card
config:
item: =myItem
//myItem.items:
...
stateDescription=" "[pattern="%.0f", readOnly="false", min="0", max="40", step="1"]
//Doesn't work either:
stateDescription=" "[pattern="%.0f", readOnly="false", min=0, max=40, step=1]
UI reads:
{"link":"http://openhab:8080/rest/items/myItem","state":"40","stateDescription":{"minimum":0,"maximum":40,"step":1,"pattern":"%.0f","readOnly":false,"options":[]}
my questions:
- Is stateDescription the wrong approach to define the default min and max values, especially for widget components in the UI?
- Do I really have to define … for each slider (or other components)?
Especially for dynamic widgets, this wouldn’t be very handy.
- component: oh-slider-card
config:
item: =myItem
min: 0
max: 40
step: 1