I encountered an issue with OpenHAB and I wanted to share it here. I am using a Shelly Dimmer (Type 1) that outputs energy consumption in Wmin. The Shelly is connected to OpenHAB via MQTT, and I have set the unit as Wmin (unit=“Wmin”) in the MQTT-Thing.
Type number : energy "energy" [ unit="Wmin", stateTopic="shellies/shellydimmer-XXXXXX/light/0/energy" ]
When I create an item (Number:Energy) and display the value (%d %unit%), it shows 59000 Wmin. However, this unit is not very common, and I would like to display the value in kWh. So, I added the unit=“kWh” to the item.
Number:Energy shelly_dimmer_1_meter_consumption "Energy Consumption [%.1f %unit%]" (gShelly_dimmer_1) ["Measurement", "Energy"] {
unit="kWh", channel="mqtt:topic:mosquitto:shellyDimmer_XXXXXX:energy" }
The result shows 59000 kWh, but shouldn’t OpenHAB automatically convert the value from Wmin to kWh?
I played around a bit more and tried to display the value in the unit kWmin. I then received the following warning message in the log:
2024-11-07 12:01:12.296 [WARN ] [penhab.core.library.items.NumberItem] - Unit 'kWmin' could not be parsed to a known unit. Keeping old unit 'kWh' for item 'shelly_dimmer_1_meter_consumption'.
I have the feeling that OpenHAB generally has an issue with the unit Wmin. Can someone help me with this? Thanks for your help in advance.
I am running the latest stable Version OpenHab 4.2 in Docker.