How to scale MQTT value using the UI (show power value in W instead of kW)

Trying to setup my openhab4 using the UI.

Finally can create MQTT value using the UI: tried to add measured value items to the MQTT bridge; forgot to create MQTT Generic first…

Reading the power which is defined by kW instead of W:

Also in the UI the rounded kW are shown:


Instead of the current around 300 W.

How to setup/converse from kW to W using the MQTT channel item?

Thanx!

Set the unit property in the MQTT Channel to what ever unti the value is comming over as. Your JSONPATH transformation should probably be there instead of as a profile.

Set the unit metadata of the Item to W.

:+1:
For reference:

So now the value ‘jumped’ from 0.3 to (about) 300W:

A point worth mentioning. When an Item doesn’t have the unit metadata defined, the system default for the Number Type is chosen. For lots of units the default is based on your regional settings. For example, if using imperial units the default for Temperature will be °F and if you are using SI units the default will be °C.

The default for Number:Power is kW.

The second point worth mentioning is that setting the unit metadata of the Item actually changes the value that the Item stores as it’s state and stores in persistence. No matter what unit value is sent to the Item, with the unit set to W the state will be converted to W.

The final point is that if the unit of the Item is changed, that change does not retroactively adjust the values already stored in persistence. So if it was storing kW before, then you change the unit to W, those older kW values will be 1000x too small.

Thanx!
Already figured out my stored data was corrupted (as can be seen in the graph). But I was setup the system, so there was no relevant (old) data to be transformed.