Part 5 of 7 · Home Assistant Energy Build
Octopus Energy integration
Adding live Octopus tariff and smart-meter data with the BottlecapDave integration — the Snug cheap window that anchors every automation, saving sessions, and a metering discrepancy worth knowing about.
The battery and the hot-water diverter are now under local control. What decides when to use them is price, and price comes from Octopus. This part adds live tariff and consumption data so the automations in Part 6 can act on the actual cheap-rate window rather than a hard-coded assumption.
Why the tariff data matters
The economic logic of the whole system is simple: fill the battery and heat the tank when grid energy is cheap, then live off stored energy when it is expensive. To do that safely and automatically, Home Assistant needs to know the tariff rates and, ideally, when they change. The Octopus integration provides current and forthcoming rates, standing charges, and smart-meter consumption — all as Home Assistant entities.
The Snug tariff
This home is on Octopus Snug, a time-of-use tariff. The rates that drive the automations are:
| Period | Window | Approx. rate |
|---|---|---|
| Cheap rate | 00:30 – 06:30 | ~7p/kWh |
| Peak / day rate | Outside the window | ~27p/kWh |
| Export (Outgoing) | All day | ~15p/kWh |
That roughly 4× gap between cheap and peak is the entire reason for overnight charging and overnight hot-water boosting. Every automation timing in Part 6 is anchored to the 00:30–06:30 cheap window — including the hard 06:30 backstop that guarantees nothing is still drawing expensive grid power once the window closes.
Installing the BottlecapDave integration
The community Octopus Energy integration by BottlecapDave is the standard choice and is installed from HACS.
- In HACS, add and download the Octopus Energy integration (BottlecapDave).
- Restart Home Assistant.
- Add it under Settings → Devices & Services → Add Integration → Octopus Energy.
- Authenticate with the Octopus API key and account number from the Octopus dashboard (Personal Details → API access).
Account, MPANs and what appears
The integration reads the account and discovers its meter points automatically. For reference, this account's identifiers are:
Account number : A-XXXXXXXX
Import MPAN : XXXXXXXXXXXXX
Export MPAN : XXXXXXXXXXXXX
From these it creates entities for the current import and export rates, upcoming rates, standing charges and half-hourly consumption. The rate entities are what the automations compare against; the consumption entities feed the dashboard's daily totals.
Saving sessions
Octopus Saving Sessions (pay-to-reduce-usage events) are exposed too. The binary sensor for these is easy to get wrong because of pluralisation:
binary_sensor.octopus_energy_..._octoplus_saving_sessions # note: octoplus, plural "sessions"
Exact name matters — It is octoplus_saving_sessions — "octoplus", and "sessions" plural. Reference the wrong spelling in an automation and it silently never triggers.
The Greenness Forecast card
Alongside the core integration, the build uses the Greenness Forecast custom card (by elyobelyob), also from HACS. It visualises how "green" the grid is expected to be over the coming period — a useful companion to the price data when deciding how aggressively to lean on the grid versus stored solar.
The import discrepancy worth knowing about
Field note — GivTCP-reported grid import runs about 32% lower than the figure Octopus's smart meter reports. This is not a fault in either system. The most likely explanation is that the Eddi's grid draw for hot-water heating bypasses the GivEnergy CT clamp — the GivEnergy system simply never sees that current, whereas the Octopus meter, sitting at the actual grid connection, does. Aligning the dashboard's "Today's Totals" with Octopus's authoritative meter figures is deliberately deferred until several days of side-by-side data confirm the pattern before making the switch.
The practical takeaway: for whole-house billing truth, trust the Octopus meter. For battery-system flows, trust GivTCP. They measure different boundaries, and the ~32% gap is the Eddi's grid boost living outside GivEnergy's measurement.
Every data source is now in place: local battery control, controllable hot water, and live pricing. Part 6 is where it all comes together — the automation architecture and the reasoning behind every decision in it.
A personal home-energy project, shared as-is and not affiliated with Octopus Energy or any vendor mentioned. Rates, settings and entity names change — check current vendor docs, and treat battery charge-rate configuration as a safety matter for your own installation.