Switch mappings

When you will make Switch mappings with diapason icon is not show correct, for example: temperature between 15 and 30 step 1, and icon heating. Icon show wrong value, problem is value for icons is need to recalculate on base 100:
icon value = ((30-point value)/(30-15))*100

I don’t know if I completely understand what you are trying to do so all I can recommend is:

  • the icon is chosen based on the state of your Item, not on any mappings or transformations made in the label

  • if the values of the heater icons do not work for you, create copies of the icons and change the last part of their name to a value you do need. See http://docs.openhab.org/configuration/items.html#icons-dynamic

  • alternatively, you can create a Design Pattern: Proxy Item and a Rule to perform the calculation so the correct icon is chosen on the proxy Item.

I think is better to makes changes in code before to take trust icon for current state, calculate stated value on base 100%. Opportunity is possibility in Set pont to confurure 0-100 with correct step and after in rule to reclculate value.

That is not how the Dynamic Icons are designed. They are designed to work with ANY type of Item and with ANY range of values. They have no knowledge what-so-ever as to what sort of Sitemap element they are tied to and your 0-100 range is a very specific and special use case. Making these sorts of changes in code would be a significant amount of effort and potentially require changes to the architecture and definitely require changes to ALL of the UIs.

If you feel strongly about this please feel free to file an issue on the Eclipse SmartHome repo. If it is accepted an issue will need to be filed on the HABpanel, Android app, and iOS app repos as well. I think BasicUI and ClassicUI are maintained on the ESH repo so a separate issue is not required there.

At the end of the day, given there is such an easy work-around (i.e. use dynamic icons like they were designed to be used) and the amount of work required to make your changes is so much I’m skeptical that the issue would be acted upon.