Recalculation in Grafana?

Hi,

I am using Home Assistant 2022.4.5 as a virtual machine. I added Grafana and Influx and it is working really nice so far.

Now I want to have two data sources in a single graph. One ranges from 0 to 1 and the other from 0 to 100. Obviously the first one is not good to recon…I would like to do a “divide by 100” for the second so both can be seen properly in the graph.

I checked for Grafana to do recalculation and found something like transformation but did not succeed in understanding if this helps.

Anyone having a clue how to do?
And no, I do not want to do the calculation in HA as it should get the correct value…

Thnaks for ideas!
/KNEBB

No need to do that. Add an override for one of the sensors, Axis → Placement → Right.

This way you get two scales on the same graph, one on the left and one on the right hand side.

Hi,

thanks for this! Yes, this is what I was looking for.

Just as a minor issue the description of the green one now is on the right, too. But that is not serious.

Thanks!
/KNEBB

You can put them in a table like this (with or without statistics) if you want:

Screenshot 2022-04-27 at 22-57-38 Grafana – Home Assistant

Hi,

ok, working, too. MEanwhile I found the way to do the calculation. I am surprised it appears to be so easy. Just add the math to the SELECT statement. See below: