Hi all,
Have you ever wanted to know how much your individual devices are actually costing? How about when you’re running on batteries and solar power, how much am I saving? We have the Energy Dashboard and that’s great for showing how much energy a device is using, but it doesn’t really let me know where my money is going, when I’m making the right choices about energy usage, and where I could be improving.
I’ve been building an integration for my own house. It’s reached the point where it might be useful for yours, so I’m sharing it.
For each device you track, it works out what it cost to run, what the same energy would have cost straight from the grid, and how much your own generation and battery saved you.
It answers questions like:
- What did the dishwasher cost me this month?
- Which of my devices costs the most to run?
- How much did my solar or home generation actually save me, in money rather than kWh?
- Is the washing machine cheaper overnight on my tariff, or at midday when the panels are producing?
It’s most useful on a dynamic or time-of-use tariff, or if you generate some of your own electricity. It still works on a flat rate with no generation: you get a plain per-device cost breakdown.
Installing
Through HACS, as a custom repository - this button opens it in your own Home Assistant:
Then select Download, restart Home Assistant, and add it under Settings > Devices & services. Full steps, including installing without HACS, are in the README.
How it works:
Every five minutes it looks at where the house’s energy came from (grid at the current price, your own generation, or the battery) and shares that cost out across the devices that were drawing at the time. I considered these things important:
- The figures add up. Anything you don’t track goes into an “Untracked” figure, so the devices plus Untracked always match what the meter says the energy cost. If they ever don’t, a sensor tells you.
- Battery energy is priced at what it cost to store, not at today’s rate. Charge cheaply overnight and use it at peak, and it shows as the saving it is.
- You don’t need to track everything. Track two devices or fifty.
What you get
- Sensors per device: energy used, actual cost, cost at grid price, savings, and the energy split by grid, generation and battery. Daily and monthly totals come with them.
- A ready-made dashboard (Add dashboard > Home Energy Advisor), plus individual cards you can put anywhere.
- Setup entirely in the UI. If you’ve set up the Energy Dashboard, most of the house inputs are filled in for you.
What you need
- Home Assistant 2026.7 or newer
- A sensor with your current import price per kWh. On a fixed rate, a Number helper with your rate in it works.
- Your cumulative grid import meter (kWh)
- An energy or power sensor for each device you want costed
Things worth knowing on a fresh install
- Nothing shows up at first. The sensors take about 20 minutes to start moving, and the dashboard can take up to about an hour and a half, because it waits for Home Assistant’s hourly statistics.
- You may get notifications about a unit changing to your currency. They’re harmless and safe to accept. The cause is a quirk in Home Assistant’s utility meter, and I’m pursuing a fix upstream.
- It isn’t your bill. Standing charges and export payments aren’t included, so the total will not match exactly with utility bill.
Where it’s at
This is 0.1.0. I’ve been running it in my own home for a couple of months, with a full validation week where the per-device figures added up to the meter every day. It hasn’t been installed anywhere else yet, so yours may well find something mine didn’t. It’s maintained by one person, me, and I’ll help where I have time.
If something looks wrong, the troubleshooting page covers the common cases. Questions are best asked in GitHub Discussions, where other people can answer and it stays findable.
I’d love to hear from anyone who tries it, especially on setups different from mine.
A note on how it’s built
I have worked as a software engineer and managed teams of software developers for many years, however I’ve built this with AI assistance, and I want to be upfront about that. This is the first Home Assistant integration that I’ve worked on, but I’ve held it to the engineering standards I’d expect of any production code:
- Every change starts as a ticket, and tests are written first. Nothing gets coded without a ticket saying what it’s for (the ticketing system is not publicly available).
- Significant decisions are written down. The docs/adr/ folder records each one, including the options that were rejected and why. I make the design calls myself.
- The accounting engine is plain Python with no Home Assistant code in it, so the maths can be tested on its own.
- One rule is tested above all others: the figures must add up. Tracked devices plus Untracked must always equal what the meter recorded.
- Every change has to pass the same checks: linting and formatting, strict type checking, a test suite that must cover at least 90% of the code, and a SonarQube quality gate. CI also runs Home Assistant’s own hassfest and HACS validation, against both the oldest Home Assistant version I support and the latest.
- Browser tests drive a real Home Assistant instance, in English and Spanish. They check what the dashboard actually shows. They have caught bugs the unit tests couldn’t, such as the dashboard breaking on a Spanish install.
- It was checked against real data before release. It ran in my own home through a validation week where the device figures added up to the whole house every day, cross-checked against an independent calculation.
- Releases happen only after the checks pass. The version number comes from the commit history, so nobody edits it by hand.
- Privacy is checked automatically. The repository is scanned so no real household data ends up in it, and the diagnostics download hides entity ids and device names.



