Energy in Home Assistant: What's Worth Measuring, and Why
Energy in Home Assistant: What's Worth Measuring, and Why
We're starting the energy module. Not with flashy charts, not with automations, and not with buying more devices. We're starting with a simple question: what do you actually want to know about your home, and what decision should follow from it?
Home Assistant can show electricity use, gas, water, solar production, grid import, grid export, battery storage, and individual devices. The official Energy Dashboard is a good place to start. But the dashboard itself doesn't lower your bill. A chart is just a picture. Savings only show up once the data leads to an actual decision.
Plan on about 55 to 60 minutes. This lesson is the foundation for the whole module. We'll settle what's worth measuring, what not to measure just for the sake of it, and how to think about energy, cost, solar, and data. In the lessons ahead we'll cover Energy Dashboard configuration, entities, YAML, the utility_meter helper, your first real measurement, whole-home measurement, solar, dynamic pricing, automations, dashboards, water and gas, and a closing mini project.
The module's core rule
First you measure.
Then you understand the data.
Only then do you build automations.
The second rule
Home Assistant doesn't save electricity by itself.
Savings only show up once the data leads to a specific decision.
Why measure energy at all
The simplest answer is: to see where the money is leaking. But that's a bit thin. Measuring energy at home only makes sense when it answers a practical question. Does the house use a lot of power overnight? Does the office stay switched on after work hours? Does the water heater run when solar is producing the most? Are the pump, router, computer, or fridge behaving normally? Is an automation genuinely saving anything, or does it just look clever?
That's an important shift in thinking. Most people start with a chart. They add a card, look at colorful bars, and stop checking it after a few days. We're going to do the opposite. First we'll settle the questions. Only then will we choose the measurements, entities, dashboard, and automations.
A good reason: you want to check what a specific device costs to run and whether it's worth changing how you use it.
A good reason: you have solar panels and want to know how much energy you use on-site versus how much you send back to the grid.
A weak reason: you want a nice-looking chart but don't know what you'll do with it.
Measuring isn't the same as saving
This sentence will come back throughout the whole module. Measuring isn't saving. Measuring is the start of a decision. If you see that a device used 0.3 kWh over the course of a day, you haven't saved anything yet. Savings only appear once you understand whether that's a lot, what it costs, whether it can be changed, and whether the change won't hurt anyone's comfort.
| Stage | What you do | Why |
|---|---|---|
| Measure | Collect data from a meter, an outlet, an inverter, or a sensor. | To stop guessing. |
| Understand | Check the units, the time window, the cost, the context, and the reliability. | To avoid drawing the wrong conclusion. |
| Decide | Pick one change: switch off, shift the timing, keep watching, or leave it alone. | So the data turns into action. |
| Automate | Only at the end do you build a rule in HA. | So the home helps, instead of creating chaos. |
What you can measure in Home Assistant
Home Assistant can collect data from a lot of places. That might be a Zigbee outlet with energy metering, a Shelly Plug, a Shelly 3EM, a DIN rail meter, a solar inverter, a water meter, a gas meter, a manufacturer integration, MQTT, Modbus, ESPHome, or data pulled from the cloud. You don't need to know every one of these terms right away. What matters at the start is understanding that each data source should answer a different question.
A note on cloud data
Data from a manufacturer's app is convenient, but it can come with delays, limits, or outages. It's often good enough for an informational dashboard. For fast automations, sources that can run locally, depending on configuration, tend to work better: a local MQTT broker, local Modbus, Shelly, or ESPHome. Simply using MQTT or Modbus doesn't guarantee anything runs locally if the traffic still passes through an external broker or the cloud.
A good measurement is more than just a number
Before you base a decision or an automation on a sensor, check that the data is current, carries the right unit, doesn't disappear after a restart, and doesn't suddenly jump for no reason. A state of unknown or unavailable doesn't mean zero consumption. It means Home Assistant doesn't have reliable data right now. A good energy sensor is: available, current, consistent in its units, resilient to a restart, cross-checked against another source, and refreshed often enough for what you're using it for.
Approximate readings versus billing-grade readings
An outlet, an inverter, a current transformer, or an ESPHome sensor can be accurate enough for spotting trends and savings. They don't replace your utility's meter, your bill, or a measurement taken with a certified instrument by an electrician. Home Assistant is an analysis tool, not an official billing system.
A fallback plan for when a measurement fails
An automation should never treat unavailable, unknown, a stalled update, or a meter restart as genuine zero usage. When a measurement goes down, doing nothing, or sending a notification, is safer than blindly controlling a large load.
| Area | What to measure | What decision it can lead to |
|---|---|---|
| Whole-home electricity | Consumption, instantaneous power, grid import, sometimes export. | When the home uses the most, and whether something's running pointlessly overnight. |
| A single device | Power, energy, cost, standby draw. | Whether it's worth switching off, shifting when it runs, or just leaving it alone. |
| Water | Daily and monthly use, unusual flow. | Whether there's a leak, excess use, or a good moment to check on things. |
| Gas | Use over time, seasonality, approximate cost. | Whether heating is behaving normally and how changes affect usage. |
| Solar | PV production, import, export, self-consumption. | Whether it's worth shifting usage into production hours. |
| Battery storage | State of charge, charging, discharging, flows. | Whether the battery is behaving as expected given your rate plan. |
What not to measure just for the sake of it
Not every device needs its own meter. If a measurement doesn't lead anywhere, it can just clutter Home Assistant. This module isn't about measuring everything. It's about measuring the things that help you understand the home, the cost, or the solar system.
Measure: devices that use a lot, run for a long time, have a standby mode, or whose work you can genuinely shift.
Measure: solar, import, export, water, and gas, if the data will help you catch a problem or improve how you use the home.
Don't measure just for the sake of it: every tiny charger, every lamp, every device, if you don't have a question the measurement is supposed to answer.
The Energy Dashboard is a foundation, not the whole project
The official Energy Dashboard in Home Assistant matters a great deal. That's where you'll see electricity, gas, water, solar production, battery storage, and individual devices. It's a good system-level view and a good place for long-term data. But in everyday use, you'll often need a second view: your own "Energy" dashboard.
Why? Because the Energy Dashboard answers the question: what happened with energy in the home. Your own dashboard answers the question: what should I do right now. That's the difference between a report and a decision panel. In this module we'll build both. First, correct data and the Energy Dashboard. Later, your own dashboard with flows, charts, costs, solar, and dynamic pricing.
Energy Dashboard: the system-level view of energy, history, statistics, electricity, gas, water, solar, and devices.
Your Energy dashboard: your everyday decision view, for example: I'm using this much right now, solar is giving me this much, the price is this, I can run something or I shouldn't.
A data source isn't a decision yet
It's easy to get lost in entities when it comes to energy. You've got a sensor, then a second sensor, then a daily total, then a cost, then a chart. So keep a simple map in mind from the start. Every measurement should travel a path from data source to decision. If you can't get to a decision, the measurement might be interesting, but it isn't necessarily needed.
Data source → entity → statistic → dashboard → decision → automation
| Step | Example |
|---|---|
| Data source | A Zigbee outlet with energy metering. |
| Entity | sensor.office_outlet_power and sensor.office_outlet_energy. |
| Statistic | Data over time, daily and monthly. |
| Dashboard | An office chart, today's usage, an approximate cost. |
| Decision | The office draws 18 W after work hours, so it's worth checking standby draw. |
| Automation | Start with a notification after 30 minutes of low draw, not an immediate shutoff. |
Power and energy: just an intuition for now
We'll get into the details in later lessons, but there's one thing you need to grasp right now. Power and energy aren't the same thing. Power tells you how fast a device is drawing energy at a given moment. Energy tells you how much it used over a stretch of time. We usually measure power in W. We usually measure energy in kWh.
| Concept | Unit | In plain terms |
|---|---|---|
| Power | W or kW | How hard a device is drawing power right now. |
| Energy | Wh or kWh | How much it used over a minute, an hour, a day, or a month. |
This distinction matters for the Energy Dashboard. Home Assistant's own documentation is explicit about separating power from energy. If a device only reports instantaneous power in W, you often need to derive energy in kWh from it, for example through the Integration sensor, sometimes called a Riemann sum integral. You don't need to do that in this lesson. For now, just remember: W is "right now," kWh is "how much over time."
A simple analogy
Power is like a car's speed. Energy is like the distance it covered. 60 mph on its own doesn't tell you how far you drove. In the same way, 1000 W doesn't tell you what you'll pay if you don't know how long the device ran.
Solar: don't just look at production
If you have solar panels, it's very easy to fall in love with the production chart. A nice sunny day, a tall bar, plenty of kWh. That's satisfying, but it isn't enough for a decision. In practice, what matters more is what happens to that energy. How much do you use on-site? How much do you send back to the grid? How much will you have to buy later? Could a device have run while solar was producing the most?
PV production: how much the system generated.
Home consumption: how much energy the house uses.
Import: how much energy you're buying from the grid.
Export: how much energy you're sending back to the grid.
Self-consumption: how much of your solar output you use on-site right away.
On top of this, many households now have access to dynamic or time-of-use electricity pricing, where the price of a kWh changes throughout the day depending on wholesale market conditions or your utility's rate plan, plus various net-metering or export-credit arrangements for solar. That's a live topic that depends heavily on your utility, your rate plan, and local regulation, so we'll use current, source-specific information in a dedicated lesson rather than untangling it here. Today, one thing matters: with solar, production alone isn't enough. Decisions come from flows and from the value of energy over time.
Real savings are more boring than the ads
In marketing, everything looks simple. Switch on a smart home and start saving. In practice, you have to do the math. If a device draws 1 W in standby, its yearly cost might be lower than the price of the smart outlet you want to buy to switch it off. If an automation runs a device during solar hours but it annoys the household, that isn't a good automation. If something is critical for comfort or safety, you don't switch it off just because a chart looks unflattering.
| Idea | A check-yourself question |
|---|---|
| Cut standby draw | Is the yearly saving bigger than the cost of the hardware and the risk of annoyance? |
| Shift usage into solar hours | Can the device run then without hurting anyone's comfort? |
| Control based on price | Do you understand your rate plan, the buy price, the sell price, and any extra fees? |
| Automate large loads | Do you have a manual override, safety conditions, and a fallback plan? |
Questions to ask before you configure anything
Before you dive into Energy Dashboard configuration, ask yourself a few questions. It'll save you a lot of time. Without this step, it's easy to end up with a system that has fifty sensors and doesn't help you make a single decision.
1. How much energy does my home use daily and monthly?
2. When is usage highest: mornings, evenings, overnight, weekends?
3. Which device do I suspect of drawing a lot, or sitting in standby too long?
4. Do I have solar, and do I want to increase self-consumption?
5. Do I have a time-of-use rate, dynamic pricing, or another billing arrangement that changes the value of energy over time?
6. What single decision should come out of the data after a few days of watching it?
Where to start in practice
Don't start at the breaker panel. Don't start with dynamic pricing. Don't start with five HACS cards and a whole dashboard. The best starting point is one simple measurement. Take a device you can safely plug into a smart outlet with energy metering. A lamp, a desk, a computer, chargers, a test router, or some other non-critical device. Watch its power right now, its usage over a day, and an approximate cost.
A good start: a Zigbee outlet with a lamp or a desk, watching it for a few days, a simple daily cost.
A good start: an Energy Dashboard with one correctly configured source, even if it starts out modest.
A bad start: installing hardware inside your breaker panel without an electrician, or automating large loads with no data behind it.
What can go wrong
You start with the charts: you have a nice dashboard, but no idea what decision it's supposed to lead to.
You assume measuring saves money: just collecting data doesn't change your bill.
You mix up W and kWh: you look at instantaneous power and draw a conclusion about the monthly cost without accounting for how long it ran.
You only look at PV production: you ignore import, export, and self-consumption.
You automate too early: the home starts switching things on or off before you know whether it makes sense.
You buy hardware without a plan: you add outlets and meters without a question they're supposed to answer.
You measure everything: Home Assistant fills up with sensors, none of which lead to a decision.
You trust every entity without checking: you never cross-check the data against a meter, a manufacturer app, or a bill.
You base a decision on delayed data: cloud data can be fine for a report but weak for a fast automation.
Assignment: map your home's energy
To do
☐ Write down three things you want to know about energy in your home.
☐ Next to each one, write the decision that could follow from it.
☐ Note whether it's about electricity, water, gas, solar, battery storage, or a single device.
☐ Choose one safe device for your first measurement in the lessons ahead.
☐ If you have solar, note separately: production, import, export, self-consumption.
☐ Write down one thing you're not automating yet, because you don't have the data for it.
☐ Note which data needs to be local, and which can come from a manufacturer's cloud.
☐ Mark one measurement you're not doing yet, because it doesn't lead to any decision.
Key takeaways
Measuring isn't saving: measuring is the start of a decision.
Don't start with automation: collect data first and check whether the conclusion actually holds.
W and kWh aren't the same: power tells you about a moment, energy tells you about usage over time.
The Energy Dashboard is a foundation: your own Energy dashboard becomes the everyday decision panel.
Don't measure everything: measure what leads to a decision, not every device just because you can.
Solar is about flows, not just production: import, export, and self-consumption are what actually drive decisions.
What's next
In the next lesson we'll move on to the Energy Dashboard step by step. You'll see where the Energy panel lives, what sources you can add, why not every entity shows up on the list, and why Home Assistant is so strict about units, device classes, and statistics.
You don't need a complete energy system yet. A good map of questions is enough. If you know what you want to measure and what decision should follow from it, you're already well ahead of someone with ten charts and no conclusions.