Humidity does not display the value correctly

I just tested some old Docker images again now. So in openhab 4.0.0-M2 the display was still correct. From version 4.0.0-M3 the error has crept in and the display of the percentage is no longer correct. Also in the last version 4.1.0-M1 the error is still present. With the changes of Rich you get it fixed, but is this the right way? After all, the binding previously worked without the additional parameters and output the correct values. Will the problem be fixed in a future version, or do I have to add the additional parameters to all items that are affected?

Yes.

The binding is still outputing the correct values. But as documented in the breaking changes, the way units are handled has undergone a massive update and the way they behave has changed (hence the “breaking” part).

If you have managed Items unit metadata was added to Items where it could be determined. Where it could not determine the unit based on the existing config and for text config files you must add the unit metadata manually if the system default unit doesn’t match the units you want.

There is nothing to fix. It’s working as designed. You will have to add unit metadata to all those Items where the unit chosen during upgrade or in .items files.

@rlkoshak okay, i get it. Means in my case I leave the item at Number:Dimensionless and add “unit” with the value “%” to the metadata. Is that correct?

Yes, that would be the standard approach to keep the units. If you don’t care about units at all, you can use just a Number Item and the units will be stripped off. But I think units are useful enough to keep them around.

@rlkoshak I have now added Unit as metadata everywhere. Now everything works like before. Thank you very much.