Power consumption showing in mWh but it should be kWh?

I’m using Grafana v10.0.3 in a Docker container on Arch Linux.

I’m trying to display my irregular power readings in Watt as kWh.

Since my readings are irregular I’m taking the mean of a time interval of an hour to get Wh using the following:

SELECT mean(“value”) FROM “autogen”.“apower” WHERE $timeFilter GROUP BY time(1h) fill(null)

Because I want to display the power consumption in kWh I divide the value by 1000 but Grafana automatically labels the values as mWh. The unit is set to just Watt-hours.

I expected Grafana to display the values as kWh.

The values are coming from s Shelly Plus Plug S via MQTT and are fed into an InfluxDB using Node-RED.

Sorry if I made an obvious mistake, calculating power and using Grafana is both new to me.

@dataprolet Instead of dividing it by 1000 after you make the query just play around with the Units it auto converts MW, Kw and Watts.

Agree with @dataprolet that it’s best to not divide by 1000 and instead set the unit to Wh in Grafana. Grafana will convert to kWh when/if it sees values that make more sense to be displayed as kWh.

And in addition to Wh and kWh, MWh will soon be added to the list of available units.