Charge in the cheap hours. Cover the expensive ones.
Smart Battery Pilot is a Home Assistant integration that plans your home battery 24 to 36 hours ahead, from your dynamic tariff, your household’s own consumption and the PV forecast. It drives any inverter you can control with a script.
- Free, MIT licence
- Runs locally
- Home Assistant 2024.11+
- Installs switched off, in dry-run
Point at a bar, or focus the chart and use the arrow keys, to read one slot.
- Charge from the grid
- Battery covers the house
- Held for a pricier hour
- Inverter on its own
A kWh charged at night for 0.10, divided by 90 % round-trip efficiency, plus a 0.10 spread, costs 0.21. That is well under the 0.50 evening peak, so the night is worth storing. The day at 0.20 is not worth spending the battery on, so the charge waits.
One planner, every season
Every 30 minutes, and whenever new prices arrive, the pilot plans the next 24 to 36 hours: the cheapest slots charge, the most expensive ones are covered from the battery, and the hours in between keep the energy for later. The same inputs always give the same plan.
-
Winter arbitrage
Night power at 0.10, peaks at 0.45 and 0.50. The battery fills before dawn, covers the morning, waits through the day at 0.20 and empties into the evening peak.
-
Summer PV export
The roof fills the battery by noon, so the pilot leaves charging to the sun. With export mode on, the evening peak is sold to the grid.
-
Dunkelflaute
Dark, still weeks bring the widest spreads. An eightfold price swing within one day makes grid charging pay for itself, even after conversion losses.
- Charge from the grid
- PV fills the battery
- Battery covers the house
- Held for a pricier hour
- Export to the grid
- Inverter on its own
The plan on your dashboard
A Lovelace card ships with the integration: planned actions, price, consumption and state of charge in one view, with three layouts from a phone column to a wall panel.







Six steps behind every plan
From the price list to the money it made, in the order the pilot runs them.
- Price forecastReads the price entity of your tariff integration: 15-minute or hourly slots, today and tomorrow.
- Consumption forecastA small model trained daily on your own history: hour, weekday and, with a heat pump, outdoor temperature.
- PV forecastExpected solar production comes off the demand, and surplus refills the battery in the simulation.
- OptimisationPairs the cheapest charge slots with the most expensive hours, within capacity, power, SOC limits and efficiency.
- ExecutionAt each slot boundary it calls your scripts: charge, block discharge, auto or export.
- AccountingFrom your battery meters it reports what the battery is worth and, separately, what the pilot added.
Careful with your battery, honest about the money
Vendor neutral: the pilot drives your inverter through Home Assistant scripts you write, so it works with any battery Home Assistant can control.
- Learns your consumptionTrained daily on your history, aware of weekdays, temperature and heat pumps.
- Uses the PV forecastWill not lock the battery on a day the sun refills it anyway.
- Plans around your carSessions evcc has planned show up ahead of time, and the battery can stay out of the car.
- Backup reserveA floor arbitrage never spends, refilled by a deadline after an outage.
- Cold-weather chargingPlans with the charge power a cold battery really accepts, and learns it.
- Two honest numbersWhat the battery is worth, and what the pilot added on top.
- Safe by defaultInstalls switched off and in dry-run. A missing price or SOC hands the battery back to auto.
- Ten languagesEnglish, German, Dutch, Danish, Swedish, Norwegian, Finnish, Estonian, Latvian, Lithuanian.
- Prices from
- NordpoolTibberaWATTarEPEX SpotENTSO-E
- Batteries, via your scripts
- FroniusVictronSMASungrowE3DCany inverter Home Assistant can control
Install from HACS
Smart Battery Pilot is in the HACS default repository, so there is no custom repository to add. It installs switched off and in dry-run: the first days are a plan to read, nothing more.
Open in HACSSearch for Smart Battery Pilot in HACS, download it and restart Home Assistant.
Add the integration under Settings, Devices & services.
Pick your price sensor, battery, control scripts, consumption meter and PV forecast.
Put the card on a dashboard.
Switch the pilot on once the plan makes sense to you.