Energy unit conversion in Graph visualization

Hi there,

I am trying to setup an energy-clock graph and I am a bit lost at the following issue: my energy clock counts in Wh (watt-hours), and I think I can convert it to kWh on the query side (should be possible to just divide by 1000, I guess).

However, the numbers are well over 1000 (currently around 2900), so Grafana converts this to mWh. Not that it would be technically wrong (1000 kWh is 1 mWh, after all), but nobody uses mWh in normal one-house energy calculations.

Having read about short+postfix workaround, I tried “stat” visualization, but that one does not offer any postfix nor even unit selection (I am on Grafana v7.5.3).

So in a nutshell, I want to ideally only convert to kWh, or if it is not possible, prevent unit conversion entirely (while still displaying a kWh postfix).

Thanks in advance
Best regards

Hi @dba2016,

So, if I understand the situation correctly:

If you had data entering Grafana with a value like, say 2974, then you want it to read 2.974 kWh on your graph, is that correct? Some screenshots of your graph and how exactly you’d like to transform your data would help a lot here I think!

I had the same problem in the graph panel. I just divided with 1000 to get kWh and made a costum Unit with kWh. I hope the screenshot helps