# Summation of energy values in dashboard not right for my case

Hello,

we have a smart meter installed in our house. the smartmeter shows the energy used and the energy given back to the grid.
But only one at a time. So if the solar produces more energy than used in our house, the energy consumed stalls and the energy produced counts and vice versa.

The energy dashboard calculates the values in this case wrong. the energy returned is substracted from the energy cosumned, but this is wrong, because the energy consumed from the smart meter is with the energy returned already, because it stalls if there ist more energy returned than consumed.

In the dashboard the “Net Consumed from the grid” value in the picture is wrong, because the net value is the 7.5kWh from the smartmeter and not 5.81 kWh.

Any idea how to fix this? Is it possible to change the way of the calculation? Because in my case, there is no need to calculate a net grid value because the smartmeter value is already that.

Sascha

No. You need to create template sensors to feed the energy dashboard what it requires.

But how?

If i increase the net value of the energy from the grid by the value of energy returned, the displayed “net consumed from the grid” is correct, but the overall value of the house is to high.
For example if i add the “Einspeisung” to the consumption, the value increases from 7.5 to 9.2 kWh. The “net consumed from grid” shows 7.5 which is correct, too.
But the overall sum of the house shows now 11.1 kWh. The right value should be 9.4kWh (Energy from grid + Energy from solar, which was not returned to the grid).

I have now idea how to get this right.

Sascha

Can you give specific states for this sensor in both scenarios, and its entity id?

Also how do you tell if energy is being imported or exported?

Do you have a solar inverter energy meter as well?

The solar inverter shows the energy generated (Hoymiles Yield total) in kWh.
The smartmeter shows the energy consumed (Bezug)and the energy energy returned to the grid (Einspeisung) as two entities as an overall increasing value in kWh.

So the entities are:

Sorry, i snipped the hoymiles yield per day, but using the hoymiles yield total, but except the reset per day it is the same.
I also have the power values in watts of the smartmeter, gets netgative, if the solar power is greater than the used power, and i have the power of the solar in watts.
If the power of the smartmeter goes to negativ, the “Einspeisung” increases and is power is positive, the “Bezug” increases.

That all looks correct. I don’t see the problem.

The net consumption meter shows the amount imported less the amount exported 7.5 - 1.7 = 5.8). It gives you an indication of your self sufficiency.

Weel, in this case the caption of the card is missleading i think, because it indicates to used only 5.8kWh from the grid, but the reality is 7.5kWh.

No, that would be gross consumption, not net consumption. The title is correct.