October 28, 2023, 2 min read, by Vinicius Bastos
Measuring Home Energy Consumption
With electric cars and solar power, measuring energy use has become essential. See how to track consumption, generation, and surplus in Home Assistant.

With the arrival of electric cars, measuring energy consumption is becoming more and more important.
Measuring consumption is useful not only to know how much you've used before the bill arrives, but also to run the most power-hungry equipment when the rate is lowest. This applies to those who have signed up for the Tarifa Branca, ANEEL's option for low-voltage consumers in which the price of energy changes with the time of day: most expensive during weekday peak hours, intermediate around them, and cheapest the rest of the time, including all day on weekends and national holidays.
Installing a solar photovoltaic system is an excellent decision, whether or not you buy an electric car.
I've been using one for more than 10 years and, thanks to it, my bill is always low; some months, it comes in at the minimum charge.
The way it works is simple: the photovoltaic generator produces energy and feeds it into the house.
The house consumes this energy and, if consumption is higher than generation, the difference comes from the public grid (you pay for it).
If consumption is lower than generation, the surplus is fed into the grid (it counts as a credit, with an adjustment fee).
This fee changed with the legal framework for distributed generation (Law 14.300/2022). Those who already had a system or requested the connection by early 2023 keep the old rules until 2045. For systems requested after that, the utility charges, on the offset energy, a growing share of the grid cost (the so-called Fio B): 60% of this tariff component in 2026, 75% in 2027, and 90% in 2028.
At the end of the month, the amount of energy consumed and fed into the grid is measured, and the electricity bill is calculated from these values.
This calculation isn't simple, because of taxes and adjustment factors, but the goal of a photovoltaic installation is to offset the home's average consumption and, as a result, get a bill at or near the minimum charge. This minimum is the availability charge, equivalent to 30, 50, or 100 kWh, depending on whether the service is single-phase, two-phase, or three-phase.
To view the home's electricity consumption, the photovoltaic system's generation, and the balance of energy fed into the grid, the Home Assistant energy dashboard is perfect!
In this video, I show how to install and configure a bidirectional energy meter and add it to Home Assistant.
If you're an integrator and want to learn how to design, install, and deliver home automation, check out QA Pro, QA's course and kit for integrators.