Do you have the best energy plan? Simulating home energy automation

TLDR: I made a site where you can upload your house and solar power data and backtest automations and energy plans including wholesale plans for total cost. All data remains local.

Motivation: Do I have the best plan?

My electricity supplier (Amber) gives me access to wholesale energy prices which change at 5-minute intervals meaning that I could be paying 2 cents per kwh during the day for electricity and $5 per kwh at night as an extreme example. To make the most of this, I’ve set up some admittedly overly complex automations for my home battery to import on cheap prices and export at expensive ones but the problem I’ve had is that there’s no easy way to know if I would have been better on a standard energy plan, or if I am running the most optimal automations for my usage (I’ve made some oversights which have cost me during peak prices)

Solution

To test whether I was on the best plan, I built a simulator that replays my real historical house usage and solar data against different tariffs and different automation strategies to show me how much my bill would be and allow me to try different automations risk-free. This works with any home assistant CSV data export so you can try it your self with your own data provided you have whole house power data (in W or KW) and/or solar power data.

How to use it

  1. Download your home assistant house and solar power data as a CSV
  2. Upload CSV data to the site and map it to the appropriate entity
  3. set up your energy plan under ‘tarrifs’
  4. pick an automation strategy and save it, make sure you pick your tarrif as the one used by the strategy.
  5. run the strategy on the results screen

You can also simulate EV automations, I haven’t properly tested this yet as my house usage includes EV usage so it felt reduntant.

Screenshots

Setting Tarrifs

Automation rules

Comparing strategies

Viewing simulation timeline

limitations

I want to be clear that this is backtesting against existing data where some of my energy usage was influenced by the energy plan I was on meaning that the results would be slightly different to what would actually happen. The default data provided is from October 2025 to June 2026 so I’m missing a few months.

Try it out

The app is live here: home-energy-simulator.sambiam.workers.dev

And it’s fully open source - the code is on GitHub. I built this purely to answer a question for myself, so it’s not polished into a general-purpose product, but feel free to use it, fork it, or build your own (probably better) version from it. If you have ideas for improving it, I’d love to hear them.

It looks like your automations and strategy made no discernible improvement and actually made things worse compared to the baseline?

I guess that’s good to know.

Indeed, it was nice to see I haven’t been pouring money down the drain. The biggest challenge I had was trying to replicate my node red flows and template entities which clearly I wasn’t quite able to match but it was close enough for now. I’d eventually like to automate it a bit more so that I can have it iterate through a bunch of different rules and thresholds to try and optimise for price but I can see that getting complicated.

Have you looked at EMHASS ?

I have not, that looks very interesting though, thanks for the recommendation. Have you tried it yourself?