There are a few things to note here:
-
"Total power [%.2f kW]"
sets how the Item is displayed in many places in the UI. It does not change the unit of the state that the Item actually carries and therefore what gets saved to the database. If you want the Item’s state to actually bekW
instead of just converting the Item’s state tokW
in some places in the UIs, you need to set theunit
metadata on the Item to be what you want the Item to carry. -
UoM is implemented wholly on the server side. Charts are implemented wholly on the client side (i.e. in the browser) and there is no equivalent UoM library that can run on the client side. This means that changing the unit of the values charted to be different from what is stored is not technically feasible at this time.
If you set the unit
metadata it doesn’t matter what the default is.