Grid consumption doesn't show when battery loads

Hello everyone,

I noticed this morning that the Energy Dashboard somehow doesn’t match the consumption from the Huawei and Shelly dashboards.

Huawei:

as we see, the battery was chared for 30 minutes with 1.122 watt at 00:00 - 00:35

and now Shelly:
grafik

shelly measured 1,1 kwh consumption on the grid-meter

and the energy dashboard :

grafik

i would expect, when the battery it loaded from the grid, than the total consumption should include the kwh that goes into the battery and the kwh which is needed by the home.
As we see in the dashboard, the sum of consumption and returned energy is exactly the same that shelly meters, but the dashboard didn’t show, that the total consumption from grid (meaning grid-import, that i have to pay) is 1.12 kwh.

On first of june i switch to Tibber and in the next winter, i want to load my battery every time, the tibber-grid-prices are under 20 cent… with the current behaviour, i wont be able to track, how much kwh i import from grid…

or am I making a mistake in my thinking?

regards
Daniel

PS: i also read the other posts with this topics, but i didn’t found one with the same behaviour… maybe in confugired anything wrong?

or maybe im wrong because i have to compare:
Huawei:
grafik

and Dashbbaord:
grafik

???

A fundamental axiom in Physics is that energy is neither created nor destroyed.

For a domestic Solar PV and battery system, the energy equation balances producers with consumers, therefore

Solar + Import + Discharge = Load + Export + Charge

The Energy Dashboard (as I understand it) reports on the energy consumed by the householder, which in the above equation is Load.

Thus, Solar generation, Grid import, and energy returned by battery Discharge are shown summed and stacked on the top of the X-axis

Grid Export and battery Charge are shown summed and stacked as negatives below the axis.

If you charge the battery with 1 kWh and discharge this back to the grid later, you have not used any actual energy.

The graph may be confusing but it is correct. If I charge my battery with excess solar, the actual immediate use is solar + import - charge. When the sun goes down, actual use becomes import + discharge. I end up using the solar energy, just later in the day. The same applies to grid charging.

To see what you used from the grid, if you are not already measuring this directly, rearrange the equation-

Import = L + E + C - S - D

Since we can’t Import and Export at the same time, nor Charge and Discharge at the same time, the equation can be simplified. You can also ignore Solar at night.

Thus Import = Load + Charge

Or Load = Import - Charge (which is what the graph shows).

In my system my inverter measures I/E and C/D as well as S and thereby works out Load for itself. There are system and measurement errors, so I use a template sensor to work out the balancing error to get back to zero.

Error = S + I + D - L - E - C

I hope that shines some light on the subject!

This is a definite change and not one for the better from my viewpoint.

I have a utility meter that tracks the 3 different tariffs from my supplier, taking below the example of Octopus Flux which is 2am to 5am where I get a low rate and charge my battery.

The energy graph I’m sure used to correctly report my Octopus Flux kWh, but now this reading is displayed wrongly and somehow affected by energy going into my battery:

So the above reports energy usage Flux as 0.7kWh - this is wrong.

As per below it is a much higher value and tracks higher than import into the battery (as expected)

Why this has been changed I don’t know but the energy graph now no longer reflects correct values for me :frowning:

Edit: I see an issue has been raised for some time on this Incorrect Energy Import Metrics · Issue #86229 · home-assistant/core · GitHub

You have a petrol car.

The tank is near empty.

You go to the petrol station and fill up with 10 gallons of fuel.

You drive 40 miles. This “uses” 1 gallon of fuel.

How much petrol have you used?
What do you want the graph to say - 1 gallon and there is 9 more in the tank, or 10 gallons because you drew that from the pump?

Say your petrol usage graph says 10 gallons. You drive another 40 miles. Usage is zero because you drew nothing from the pumps.

Amazing. You run your car for free.

PS. If you remove the battery sensors from the energy dashboard settings, you may get the graph you want. You just won’t see the energy going to and from the battery.

What I want is not to display incorrect values.

Flux 0.7kWh is clearly wrong

If it is supposed to work as you say (debatable as no maintainer has replied on the github issue) then report something in a way that most ordinary people can understand :wink:

I believe that it is correct.

Let me try another analogy.

You go to an ATM machine and take out £100.

You buy a coffee and sandwich for £10,and put the rest in your pocket.

How much have you spent?

In accounting terms, which is what this is, what you spent (debit) goes on the top of the line. What you move to your pocket (exported) goes to the bottom of the line (reserve credit).

What you took out of the ATM is the total height of the bar, being the sum of spend and move to reserve.

It really is just double-entry book keeping. And like any good book keeping it has to balance.

Hopefully a maintainer will update the github issue and clarify.

I understand what you are saying but based on the github issue reports from different people and a couple of threads here clearly everyone doesn’t, so at least it needs clarification.