I understand what you want, and it is attractive. There are “buts”.
What you want to do would limit what other people can do.
It is of course possible to add some control to select behaviour “old” or “new”.
That’s the thing, it is a change.
Example iconset
thermo.svg (blue)
thermo-10.svg (green)
thermo.svg-20 (red)
Setpoint widget range -5 to 25 step 1
Existing behaviour, with an Item state of 5 I get blue icon. state of 15, green, state of 32 (the Item can get data from other sources than this widget) red icon.
With an auto-base-100 selection, I get 5 blue, 15 blue, 32 blue , because the thermo-10 icon is the new “auto” midpoint. Or is the one-third point?
Of course that could be fixed by changing the icons to suit the new scheme, but that’s a breaking change for existing users. (and the whole point of the scheme was to avoid changing icons?)
Elsewhere in my sitemap, on a different sub-page, I present the same Item as a Text widget with no control, of course that works with current icons. I’m not sure what would happen under “auto” scheme?
How about if I had a Switch type widget with buttons to select preset setpoints - how would that work?
Make no mistake - I think the current icon selection scheme is clonky and nasty. That isn’t that surprising when it works with sitemap files that are also clonky. The whole UI is lacking refinements, not just this area.
Let me make an alternative suggestion - forget the widget.
Think about specifying the “range” of an icon set exactly where it has effect - where you specify the icon. e.g. at the Item <icon>
definition, or if overriding with sitemap, in the sitemap icon=
definition.
Part of any enhancement in this area should be to add capability to deal with negative and >100 numeric Item states.
Let’s imagine something like
<iconname [-10 to 255]>
and the icon provider at the OH end can find the set of six or ten icons - we should perhaps need a standardized 0-100 range for those - and scale them accordingly to fit when requested.
The widget you choose is irrelevant, the scheme still works with non-sitemap UIs.
That still has limitations, but you do keep the choice of “old/direct” or “auto” behaviour which does allow flexibility for many cases.