I’ve successfully setup openhab5 and configured a model, some things (smartmeter and lambda heat pump) and created a nice overview page with gauges. All this works smoothly.
I want to connect a sensor.community air quality sensor. I found the binding and successfully configured it. The values of the sensor are in the µg/m³ range. They are displayed correct, with correct unit, and they are stored in the database as ‘0.0000xx’ which is correct as well.
I also added gauges at the overview page, but am stuck with a problem.
It seems the min/max of the gauge are only integer values, so I cannot enter e.g. ‘0.000500’ which would be the correct value for max. The smallest possible value is 1, which is obviously far too large here.
I am aware that one can apply transformations/scaling to values, but then I would loose the correct values/units I already have, wouldn’t I?
There is a page in the documentation with details about the configuration settings for all the oh widget components:
The oh-gauge page lists min and max properties. So, one solution could be to just adjust those so that the appropriately bracket your air quality values.
Another alternative is the value property of the gauge. There you could build a widget expression that transforms the state of your item into something more appropriate for the 0 - 100 range of the gauge. That’s a slightly more advanced approach but one that gets you into widget epxression which opens up a whole new level of building the UI.