I want to use a slider widget in sitemaps to control the volume of my Yamaha AV receiver. All works like a charm, I use a Dimmer item to bind to the volume configuration and then use a slider widget to control that. However, what I would like to change the range of the slider widget that the leftmost position corresponds to 20 and the rightmost position corresponds to 80, because beyond these values the volume is much too loud / too low. Is that somehow possible to achieve?
I know I could use a set point widget, as this has max/min/step values but I find the widget rather clumsy compared to the nice slider…
Anyone know hot to do the trick with slider?
Thank and kind regards
You can’t do it on the slider directly. But you can write a rule to check what value it is sending and block it from sending over 80 or under 20. That is about the best you can do.
I am trying to add a slider with minValue, maxValue and step as described in the documentation in OH 2.4.
My definition in .sitemap is:
Slider item=NEEO_ECL_mRDC_Salon_light step=1 minValue=1 maxValue=5
and I get following syntax error:
Configuration model 'domus.sitemap' has errors, therefore ignoring it: [477,41]: no viable alternative at input 'step='
Replacing slider by Setpoint works fine but I need a slider. Any idea?
Order usually matters. The docs puts step last.
In the future, it is better to open a new thread than to post to a three year old thread.
No matter the order, it raises an error with the slider whereas the Setpoint works.
Same issue with:
Slider item=NEEO_ECL_mRDC_Salon_light minValue=1 maxValue=5 step=1
I have the same problem. It is not possible to assign minValue, maxValue, step so a Slider.
Here is a Hardcopy out of Visual Studio:
I wonder why nobody else has this problem.
You’d need to use a recent snapshot version I think
thank you for this information, so i can stop trying …
I will check out the recent snapshot and test it.