Open kvolden opened 6 years ago
This is now implemented for the openHab Android app: https://github.com/openhab/openhab-android/pull/738
I hope this will be implemented in Basic UI soon as well, so I don't have to keep two almost identical sitemaps.
Please see my https://github.com/openhab/openhab-android/issues/735#issuecomment-370342895 - I don't think that this is the right way to approach the issue - we should not start stacking multiple different UI elements per widget.
It's pretty common for home automation software to support having both a switch and a slider-like element combined into one for dimmable lights – Z-Way, ImperiHome, Fibaro Home Center, Vera etc. Slider elements in openHab/smarthome already have the "switchSupport" parameter, but this is only used in Classic UI, and there only to modify the function of the already existing up and down buttons. In Basic UI one is left with having to create two elements for the same thing, one Switch and one Slider, with basically the same label and controlling the same thing, taking up twice the real estate and making the control slightly more awkward than it needs to be.
I would love to see switchSupport implemented in Basic UI as well, but rendered as a single element with both a switch and a slider bar, much like this:
The usefulness of this is e.g. for Z-Wave items that have support for ON and OFF commands as well as for precise levels. Usually ON has a value of 255, and will often turn the device back on to its previous dimmer level (or a specific preset value, or something else entirely, all dependent on the physical device and its configuration). So this must not be confused with ON just being a shortcut for setting the slider to 100% – something on which the documentation is a bit unclear with regards to Classic UI functionality.