Home battery and Home Assistant: Charge cheap, discharge at peak (UK)

Published 8 April 2026 · 11 min read

Read in: English · Deutsch · Español · Italiano · Français · Русский

Some links in this guide are Amazon affiliate links — we earn a small commission if you buy, at no cost to you. We only recommend kit we'd put in our own homes.

Using Home Assistant to orchestrate a UK home battery is worth roughly £400–£650 a year on top of what the battery's own app earns. Three automations get you most of it: charge dynamically on the cheapest overnight slots, skip that charge when tomorrow looks sunny, and discharge into the 4–7pm peak.

This guide answers three questions:

  1. Does my battery work with Home Assistant? Quick-look table below — GivEnergy and Fox ESS are easiest, Powerwall is read-only, everything else lives on community Modbus integrations.
  2. What automations actually move the needle? Three of them, written up further down.
  3. What goes wrong over the life of the system? Firmware breaks, Modbus stalls, inverter clock drift — covered at the end.

Battery integration status at a glance

BrandHA integrationRead stateSchedule controlNotes
GivEnergyGivTCP (MQTT) or givenergy-localFullFullThe benchmark — best HA integration of any battery brand globally
Fox ESSnathanmarlor/foxess_modbus (HACS)FullFullTalks local Modbus, not cloud — outages don't break automations
Tesla PowerwallNative HA integrationFullOff-grid switch onlyExcellent observability, very limited control. Per-slot scheduling needs unofficial API wrapper
Sofar / Solax / SolArk / Sunsynk / HuaweiCommunity Modbus (TCP or RS485)FullFull (varies by brand)Set-up effort upfront, reliable once running
PylontechInherited from your hybrid inverter (Sofar/Solis/Growatt/SolaX/Sunsynk)DependsDependsPylontech is the battery; the inverter is the brain
PowerVault / Puredrive / MyEnergi LibbiYounger community integrationsPartialPartialIf you already own one, expect more glue work

If you have not yet bought and HA orchestration matters: GivEnergy is the safe default, Fox ESS the strong second.

The arithmetic, briefly

Charge a 10 kWh battery overnight at 7–9p/kWh (Octopus Intelligent Go or Agile cheap slots) for ~70–90p. Discharge it across the 4–7pm peak at 25–28p/kWh (April 2026 Ofgem cap, higher on Flux) and you displace ~£2.50–£2.80 of grid import. Round-trip efficiency is 88–92%, so usable arbitrage is £1.20–£1.60 a day on the days the battery cycles from grid (not solar). Annualised: £400–£650 a year on Intelligent Go; solar-plus-battery on Flux pushes higher by exporting into the premium window.

Your battery's built-in scheduler will capture some of that — but it cannot react dynamically to Agile prices, coordinate with solar or an EV charger, or notice when household load is killing the day's reserve. Home Assistant chases the last 30–40% of the arbitrage that a fixed schedule leaves on the table.

Why the battery's own app is not enough

Most UK home batteries ship with a basic time-of-use scheduler. You set a charge window — typically "charge from grid 00:30 to 04:30" — and a do-not-discharge window for the evening peak. On a flat off-peak tariff like Octopus Go or Intelligent Go, that works reasonably well. The cheap hours are always the same and the battery fills up inside them.

The moment you step off a flat off-peak window, the manufacturer app starts to strain. It cannot react to:

  • Half-hourly Agile prices, which move the cheapest window every single day
  • Tomorrow's solar forecast — there is no point dragging 10 kWh in from the grid at 6p if the roof is going to fill the battery by noon for free
  • Your EV charger deciding to pull 7 kW from the same cheap slot, so the battery and the car end up competing for the same half hours
  • Household load spikes that quietly drain the battery at the wrong time of day, leaving you with nothing for the evening peak

Home Assistant sees all of these things at once. Prices, forecasts, car state, household load, battery state of charge. It can make a decision every half hour rather than following a schedule written last month. That is the gap, and that is where the ROI sits.

Battery brands in more depth

The table above is the summary; this is the detail behind each entry — useful if you've decided on a brand and want to know what you're walking into.

GivEnergy Home Assistant integration

The most common home battery in UK installs right now, and arguably the best Home Assistant integration of any battery manufacturer in the world. Two community options dominate: GivTCP (britkat1980/giv_tcp) is an add-on that publishes state and controls over MQTT, and the givenergy-local custom component talks to the inverter directly. Between them they expose state of charge, grid flow, PV generation, battery power, and — crucially — full schedule and power-limit control. You can set "charge from grid to 90% by 05:00" directly from an automation and the inverter obeys. If Home Assistant integration matters to you and you have not yet bought, GivEnergy is the safe default.

Fox ESS

Solid community support via the nathanmarlor/foxess_modbus HACS integration, which talks locally over Modbus rather than the Fox cloud — a genuine advantage because cloud outages no longer take your automations down. Reads state of charge, generation and grid flow, and you can push charge periods, work modes and SoC targets. Less polished than GivEnergy, but it works reliably once configured.

Tesla Powerwall Home Assistant integration

Home Assistant has a native Powerwall integration that reads everything — state of charge, grid flow, modes, operational data. Control is the issue: Tesla deliberately keeps scheduling logic on its side. The core integration actually only exposes an "off-grid" switch, not mode switching; dynamic per-slot scheduling of the kind GivEnergy allows requires an unofficial API wrapper and is much harder in any case. Powerwall owners get excellent observability and very limited control.

Pylontech

Pylontech sells the battery modules. The brain is whichever hybrid inverter you pair them with — Sofar, Solis, Growatt, SolaX, Sunsynk. Your Home Assistant integration is inherited from the inverter, not from Pylontech itself.

Sofar, Solax, SolArk / Sunsynk, Huawei

All of these work with Home Assistant via Modbus — either TCP over a network dongle or RS485 with a USB adapter. There is a bit of setup effort upfront, but once they are talking they are reliable. Solax has a reasonable community integration. SolArk and Sunsynk (the same hardware platform, rebadged) are covered by an active community integration that handles both state and control. Huawei works via the community Modbus integration, though scheduling control is a weaker point.

PowerVault, Puredrive, MyEnergi Libbi

Newer or smaller-vendor batteries. Integration is typically younger, patchier and more dependent on one or two community maintainers. If you already own one, you will probably find a working integration but fewer examples to copy. If you have not bought yet and Home Assistant orchestration matters, GivEnergy or Fox ESS will cost you a lot less grief.

The three automations that earn the battery back

You do not need twenty automations. You need three that run every day without drama.

Automation 1: dynamic overnight charge based on tomorrow's prices

On a fixed off-peak tariff like Octopus Go or Intelligent Go, your automation charges the battery inside the fixed cheap window. Easy. On Octopus Agile, the cheap slots move — so Home Assistant pulls tomorrow's half-hourly prices, finds the cheapest contiguous window long enough to fill the battery from its current state of charge, and charges only during those slots. Skip this entirely if tonight is already looking expensive and tomorrow's daytime prices are lower.

This is where a proper Octopus Agile setup in Home Assistant earns its keep.

Automation 2: skip the overnight charge when solar is forecast abundant

If tomorrow's solar forecast says the roof will produce more than you can consume and the battery will fill itself for free by lunchtime, skip the overnight grid charge entirely. On a sunny day in May that is a straight saving of whatever you would have paid to import. The Forecast.Solar integration gives you a reasonable tomorrow-kWh estimate based on your panel orientation and size. It will not be perfect, but "above or below a threshold" is all this automation needs. See the solar in Home Assistant guide for the forecast setup.

Automation 3: discharge during peak pricing, hold during shoulders

On any tariff with a meaningful peak — Agile price spikes, standard-tariff 4-7pm peaks, or the Octopus Flux 4-7pm window — discharge the battery to cover household load during the peak itself. This is the highest-£/kWh part of the cycle and the single biggest line item in your arbitrage. Equally important: hold the battery through the shoulder hours. If the battery dribbles itself flat at 2pm chasing the dishwasher, there is nothing left for the 5pm peak and the whole day's arbitrage collapses.

Octopus Flux and Home Assistant — existing customers only

Octopus Flux is designed specifically for solar and battery owners. Cheapest grid import in the small hours, highest export rate 4-7pm, a middle rate at all other times. The rough structure is an off-peak import in the mid-teens per kWh, a 4-7pm import in the high 30s, and a 4-7pm export in the high 20s — numbers move with wholesale, but the shape is stable.

Important as of 2026: Octopus Flux closed to new customers in March 2026. Existing Flux customers still have it and the automation logic below still applies, but nobody new can sign up. For new solar-plus-battery households, the alternatives are Octopus Agile for import optimisation combined with Octopus Outgoing Fixed (12p/kWh as of March 2026) or Outgoing Agile for export.

If you are already on Flux, the automation pattern is almost formulaic. Charge the battery overnight during the cheap window. Hold through the day (let solar top it up for free). Discharge into the house and to the grid during the 4-7pm export window so you sell back at the premium rate. GivEnergy and Fox ESS handle this cleanly from Home Assistant. See the broader energy savings guide for how Flux compares with Agile for different household shapes.

The one source of truth rule

The single biggest failure mode in home battery automation is Home Assistant and the battery's own app fighting each other. They both try to schedule the same asset. The battery thinks it is in charge. Home Assistant thinks it is in charge. They overwrite each other's instructions five times a day. The result is a battery that charges at the wrong time, discharges at the wrong time, and earns a fraction of what it should.

The rule is simple: pick one. If Home Assistant is running the schedule, put the battery's built-in scheduler into a permanent idle or plain self-consumption mode and do not touch it again from the app. If the manufacturer app is running the schedule, let it, and use Home Assistant for observability only. What you cannot do is run both.

What can break

Batteries live for a decade. Integrations do not. Things to watch for over the life of the system:

  • Battery firmware updates occasionally break community Modbus integrations without warning. The fix usually lands within days, but you need to notice the break.
  • Modbus connections (TCP or RS485) can silently stall. Add a watchdog that checks you are getting fresh data every few minutes and alerts you if not.
  • Agile price data can arrive late from Octopus on bad days. Do not let an automation fire on stale prices — always check the timestamp before making a decision.
  • Cold weather reduces the usable capacity of lithium batteries. Your "full charge" in January is not the same number of kWh as it is in July. Automations that assume a fixed kWh will quietly under- or over-shoot through the year.
  • Inverter clocks drift. If the inverter's idea of 16:00 is three minutes out from Home Assistant's, your peak discharge starts late. Worth a look once a year.

Where this leaves you

A home battery orchestrated by Home Assistant is one of the few smart home projects where the maths is genuinely compelling. Three automations — dynamic overnight charge, solar-forecast skip, peak discharge — capture most of the available arbitrage on most UK tariffs. A fourth layer ties in EV charging so the car and the battery stop fighting for cheap slots. Done well, the combined stack can return several hundred pounds a year beyond what the battery's own app would have earned.

Done badly, you end up with two schedulers in a cage fight and a battery that never quite does what you expected. If you have £5-8k of battery committed and you would rather not debug Modbus timeouts on a Sunday morning, habbb's managed Home Assistant service keeps the integrations patched, the schedules running and the battery earning. You own the kit. We keep it working.