Openweathermap changed value output of humidity after upgrading to OH4

Found a another little issue after being updated to OH4 with the output of humidity of openweathermap:

Output is rounded to 1, as the raw value given in that channel is actually “0,84” and unit is “one”, not “%”.

Within OH3 I would have seen 84 % in paperui, channel definition remained the same:

Number:Dimensionless localCurrentHumidity "Aktuelle Luftfeuchtigkeit [%d %unit%]" { channel="openweathermap:onecall:api:local:current#humidity" }

Following description in bindings documentation:

So, pretty obvious something changed, but what?

I can modify output and unit, but is that wanted?

Yes, you have to update your item definition to set unit=%.
Please read UoM stuff associated with the release notes.

1 Like

You can even find an example for Number:Dimensionless!

Ok, understand, so basically add unit definition to channel:

Number:Dimensionless localCurrentHumidity "Aktuelle Luftfeuchtigkeit [%d %unit%]" { unit="%", channel="openweathermap:onecall:api:local:current#humidity" }

Just for my understanding, why didn’t it change on temperatur?

This is the temperatur channel of above given screenshot, w/o unit definition:

Number:Temperature localCurrentTemperature "Aktuelle Temperatur [%.1f %unit%]" { channel="openweathermap:onecall:api:local:current#temperature" }

Default unit for Number:Temperature is °C in metrics measure system which is certainly matching your need.

Ok, so here comes the new option in runtime.cfg in function?

org.openhab.i18n:measurementSystem=[SI|US]

If set to “US” temperature will become “°F” automatically?

And if I would like to see “°F” instead of “°C”, even generic defined to “SI=metric”, I could define “unit=F” in temperature channels?

That’s why it is preferable (but not mandatory) to define the (internal) unit, to be sure it will be “blocked” whatever could happen.
I did not do it myself when the default unit matches my need. But that is not the recommendation.