Networkupstools gives wrong value for battery charge after updating to Openhab 4.0

I just updated my OpenHAB setup from 3.1 to 4.0. After updating the BatteryCharge value reported by the networkupstools binding is no longer ‘100’ but ‘1’, and now my grafana dashboard shows an almost empty battery.

Looking at the actual data from the UPS, the battery charge is 100%. Did something change in the binding and is the charge now stored as a normalised float or is this a bug in the binding?

Nothing changed in the binding. But something did change in units of measurement. If you’ve linked that channel to a Number:Dimensionless and you’ve not defined the unit metadata to be %, the system default of ONE is being used.

1 ONE == 100 %

Full details about the changes to UoM are in the announcement notes.