Energy Dashboard is not calculating grid coupled battery usage correctly

as the image shows 7.9 kwh has been drawn from the grid. 2.7 kwh of this has gone in to top off the batteries. 1.1kwh has been drawn from the batteries. meaning the house has used 6.3kwh ((Grid IN - Battery IN) + Battery OUT)

HA currently shows 9.1kwh (Grid IN + Battery OUT)

This is consistent every day.

sensors are
Grid IN
Battery IN
Battery OUT

Yep there’s something wrong there.

Assuming your house obeys the laws of thermodynamics and energy can not be crated or destroyed:

Supply = Load

→ Grid + Battery Out = Home + Battery In

→ 7.9 + 1.1 = 9.1 + 2.7

→ 9.0 = 11.8 which is clearly not correct.

Can you please describe the sensors you are using, where they are placed in the energy dashboard config and what they measure?

i.e. does your grid sensor measure battery as well as home energy?

Thanks for the fast reply

this is a quick sketch of the system, I’ve tried to keep the sensor colours consistent with the HA scheme.

While solar does contribute this is done via DC coupled MPPT Chargers and any relavent output is monitored via the Battery OUT sensor.

I’ve verified the grid in sensor to the DNO meter readings and found it is within 1%
I’ve verified the Battery IN and OUT sensors with other calibrated current and volt meter and found them to perform within 0.5%

In this case I would expect Home to equal House Loads + Critical Loads

I agree with your calculations Grid + Battery OUT = Home + Battery IN except in this case Home is already presented including Battery IN

Home = Grid + Battery IN + Battery OUT

That decoupled solar is going to mess up the energy dashboard calculations. The energy fed to the inverter is not accounted for.

The way I see it the solar is accounted for in the Battery OUT (less system losses). this morning the calculation was off by the battery IN value before the sun had risen and the solar started any production. It would be no different than the battery OUT using energy stored from the day before or not having any DC coupled solar.

This is the usage over several days as we’ve had little to no solar production the battery has been operating at a loss yet still the Battery IN value is Accounted for twice in the Home Usage

Here I would expect the Home value to be 258.4kwh (Grid IN - Battery IN + Battery OUT)

The discrepency in the Battery in & out is down to losses in the Inverter charge and discharge. As there has been minimal solar the inverter charger has been running around 75% efficency. The system charges during low rates and has an almost constant load so this still represents a saving in terms of energy cost.

The graph shows the energy going into the battery as a negative value?

Todays solar production has been less than 0.07kwh this would be less than a rounding error for HA

Sorry but no that is not how it works. The over-all formula used by the energy dashboard is:

Grid supplied + Solar + Battery out = Home + Battery in + Grid feed-in

The way you have your sensors/system set up is not supported by the energy dashboard. That is just not how the calculations are performed.

You will have to create your own energy view/dashboard or account for your solar energy into the system (minus dc-ac conversion losses). Does your inverter not supply this information?

Taking the solar out of the equation the home value is still incorrect. As today the solar is effectively 0 (0.07)

The equation you’ve given doesn’t work out (values as if this second)

Grid IN + Solar + Battery OUT = Home + Battery In + Grid Return

10.6 + 0 + 1.7 = 12.2 + 2.7 + 0

12.3 = 14.9

If this is not supported by HA can you advice how to have the sensors placed and configured? Or a guide for how the energy dashboard is expecting the values?

The inverter does supply the values but not easily integrated into HA using off the self monitors allowed me to not have write anything for the inverter.