Metering · Distribution board
Energy metering in the distribution board
Direct or CT metering, and why checking against the meter is the most important step.
Read article →Article · Metering · Battery
The inverter app says 70 % self-sufficient, and the electricity bill doesn't quite agree. That need not be a mistake, but it can be. The self-sufficiency figure depends on which values a display adds up and where they are measured. Only one measuring point is beyond dispute: the meter your bill is based on. This article shows the calculation, the places where a display comes out too good, and a check you can do yourself within a month.
HTW Berlin, a university of applied sciences in Berlin, defines both figures like this in the notes to its independence calculator (Unabhängigkeitsrechner):
As formulas, using annual or monthly amounts in kWh:
Self-sufficiency = 1 − grid import ÷ consumption
Self-consumption = (solar generation − export) ÷ solar generation
The second part of the definition is the one that matters: whatever goes into the battery counts as self-consumed the moment it is charged. Whether all of it comes out again later makes no difference to the self-consumption figure. A lossy battery raises it just as much as an efficient one.
In a solar system with a battery, energy is lost along the way. The 2026 Stromspeicher-Inspektion (battery storage inspection) by HTW Berlin and aquu distinguishes four kinds of system losses: sizing, conversion, control and standby losses. Control losses explicitly include inaccuracies in measurement, and standby losses include the consumption of control electronics, communication modules, displays and the power sensors at the grid connection point.
According to the study, all four have one thing in common: they increase grid import or reduce export. It goes on: the overall efficiency of a PV battery system can only be assessed meaningfully from the energy flows at the grid connection point. That is where the meter you are billed from sits. Whatever is lost inside the house shows up there, either as import or as missing export.
How much devices differ is clear from the study's measurements:
Exactly which values a manufacturer's app adds up is rarely documented in full. The three mechanisms below follow from the arithmetic itself; whether and how much they apply to you is what the check in the next section shows. The worked example is deliberately simple and uses assumed values, not measurements from any particular system:
Worked example, one year: solar generation 8,000 kWh, export 4,000 kWh, grid import 2,500 kWh. The battery takes in 2,000 kWh and delivers 1,800 kWh; 200 kWh are lost in charging, discharging and standby.
The simplest way to work out consumption is the balance: solar generation plus import minus export. In the example that is 8,000 + 2,500 − 4,000 = 6,500 kWh. That figure contains the 200 kWh of battery losses, which are therefore treated as demand covered by your own system. Self-sufficiency becomes 1 − 2,500 ÷ 6,500 = 61.5 %.
Counting only what the appliances in the house actually used, without the losses, gives 6,300 kWh and a self-sufficiency of 1 − 2,500 ÷ 6,300 = 60.3 %. The grid import is the same in both cases; the first figure is higher only because it counts losses as covered demand.
Self-consumption works the same way: (8,000 − 4,000) ÷ 8,000 = 50 %. But only 3,800 kWh of it reached the appliances, which is 47.5 % of the solar generation. The remaining 200 kWh count as self-consumed by definition, although nobody used them.
Battery systems control their output using their own power sensor at the grid connection point, and an app may show that sensor's values. The sensor is not the meter you are billed from. If over a year it records 200 kWh less import than the meter, 2,300 instead of 2,500 kWh, the displayed self-sufficiency in the example rises from 60.3 % to 1 − 2,300 ÷ 6,300 = 63.5 %. Only a comparison with the meter tells you how big the difference is in your case.
At night, when the battery is empty, the inverter, battery and sensors still need power. Depending on the system, it comes from the grid or from the battery. If it comes from the grid, it is on the meter but possibly in no category of the app. If it comes from the battery, it is part of the battery losses in point 1. Based on the Stromspeicher-Inspektion figures, that is between 5 and 224 kWh a year, depending on the device.
All you need is the meter and the app. The important thing is that both cover the same period.
If your result is clearly below the display, you know the app calculates more generously. Solar generation still comes from the inverter; few systems have a separate billing-grade generation meter. The battery's state of charge at the start and end of the month usually differs a little; over a month that remainder is small compared with the monthly amounts.
The Home Assistant energy dashboard calculates exactly along the lines above. In the frontend source code, household consumption is grid import + solar + battery discharge − export − battery charge, and the self-sufficiency gauge is 1 − grid import ÷ household consumption. Battery losses are therefore left out, provided the charge and discharge sensors measure on the AC side.
The result is only as good as the sensors you enter, though. Use the inverter's sensor as grid import and you inherit its deviation. Read the billing meter instead, for example with an optical reading head, through the P1 port in the Netherlands, or with your own measurement in the distribution board that has been checked against the meter, and the reference is in your dashboard. How to do that is covered in the article on energy metering in the distribution board.
For the monthly check from the previous section, create five utility meter helpers with a monthly cycle: on grid import, export, solar generation, battery charge and battery discharge. A template sensor then recalculates self-sufficiency from them:
template:
- sensor:
- name: "Self-sufficiency month (meter)"
unit_of_measurement: "%"
state: >
{% set imp = states('sensor.grid_import_month') | float(0) %}
{% set exp = states('sensor.grid_export_month') | float(0) %}
{% set pv = states('sensor.solar_generation_month') | float(0) %}
{% set chg = states('sensor.battery_charge_month') | float(0) %}
{% set dis = states('sensor.battery_discharge_month') | float(0) %}
{% set home = pv + imp - exp - (chg - dis) %}
{{ ((1 - imp / home) * 100) | round(1) if home > 0 else 0 }}
The sensor names depend on your helpers. Without a battery, leave out charge and discharge. The difference between charge and discharge over the month is also your battery loss, which apps rarely show separately.
The calculation assumes the solar generation figure is right. It almost always comes from the inverter, and any error there feeds into consumption. The charge and discharge sensors are device values too; if a battery only measures on the DC side, the conversion losses are missing from the difference. And a high self-sufficiency figure is not a goal in itself: HTW Berlin itself advises not to look only at self-consumption and self-sufficiency when choosing a system. What counts in the end is on the electricity bill.
Self-sufficiency = 1 minus grid import divided by household consumption. Take the grid import from the meter your bill is based on, not from the app. Household consumption is solar generation plus import minus export, less whatever is lost in the battery.
Two possible reasons: the app measures grid import with its own sensor, which can differ from the meter, or it counts battery losses as consumption covered by your own system. A one-month comparison with the meter readings shows whether the app's import figure is right.
In the 2026 Stromspeicher-Inspektion by HTW Berlin, the standby power of the tested systems with an empty battery ranged from 4 to 64 watts. In a single-family home a battery is typically empty for 1,250 to 3,500 hours a year. That works out at roughly 5 to 224 kWh a year.
Definitions and measurements come from HTW Berlin (in German), the way Home Assistant calculates from its source code. The worked example uses assumed values.