Handle input as mWh

Hi There,

I’m using a KNX energy meter that seems to return mWh (Not MWh) instead of kWh.
Is there an integrated way to tell openHab, that the input is in this unit or is the only way to add a transform that devides the input by 1000?

Bests
Pascal

The docs are not clear on this unfortunately.

Note: The number channel has full support for Units Of Measurement (UoM).

Using the UoM feature of openHAB (QuantityType) requires that the DPT value is set correctly. Automatic type conversion will be applied if required.

Incoming values from the KNX bus are converted to values with units (e.g. 23 °C). If the channel is linked to the correct item-type (Number:Temperature in this case), the display unit can be controlled by item metadata (e.g., %.1f °F for 1 digit of precision in Fahrenheit). The unit is stripped if the channel is linked to a plain number item (type Number).

Outgoing values with unit are first converted to the unit associated with the DPT (e.g., a value of 10 °F is converted to -8.33 °C if the channel has DPT 9.001). Values from plain number channels are sent as-is (without any conversion).

I don’t know KNX, is there a DPT to indicate mWh? I don’t even know what that means but I assume you do.

If you link this to a Number:Energy with unit metadata of kWh what do you see? Is the value correct (i.e. converted) or off by a factor of 1000 or something else?

In a pinch, you could use a transform to append the unit or convert the unit. If we can get proper units applied to the number comming out of KNX though, the conversion should happen automatically.

Which energy meter?
You’ll have to be more specific, as there are literally thousands of knx devices (and very likely more than hundred different energy meters…)