Smart Home Assistant

Home Assistant Octopus Agile: Run Appliances at the Cheapest Slots

SepehrBy Sepehr· 2 November 2026· Updated 2 November 2026· 7 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources
Row of four electricity smart meters mounted on a weathered wooden house wall

Key takeaways

  • Home Assistant Octopus Agile automations need two HACS integrations: Octopus Energy for rates and Target Timeframes to pick the cheapest half-hour slots.
  • The Octopus integration's own target rate sensors were removed around the end of November 2025, so older tutorials using them no longer work.
  • Octopus publishes next-day Agile rates between 4pm and 8pm, so a 00:00 to 00:00 sensor cannot calculate until then.
  • Do not cut power to a washing machine or dishwasher mid-cycle; many appliances will not restart a programme when power returns.
  • Octopus APIs allow 100 calls per hour across the app and all integrations, so avoid shortening refresh intervals needlessly.
On this page[tap to expand]

Home Assistant Octopus Agile automations switch appliances on during the cheapest half-hours of the day. You install two community integrations, feed Octopus rates into a Target Timeframes sensor, and trigger a plug, charger or immersion heater from it. Allow about 40 minutes.

The catch is a change from older guides: the Octopus Energy integration no longer creates its own target rate sensors. Anything written before late 2025 that tells you to add one inside the Octopus integration is out of date, and this guide uses the replacement.

What do you need before you start?

  • An Agile Octopus tariff (or another half-hourly tariff) and a working smart meter. Octopus says Agile needs a SMETS2 meter, or some SMETS1 meters, and connection usually takes about 14 days. Our Octopus smart tariffs comparison covers whether Agile suits you, and the smart meter guide explains the meter side.
  • Your Octopus API key and account number, both found in your online Octopus account (the key sits under the API access section of your personal details). Treat the key like a password: generating a new one invalidates the old one.
  • Home Assistant with HACS. Both integrations install through HACS. Beta coverage of Home Assistant 2026.11, due on 4 November, says HACS becomes a built-in Marketplace under Settings; see our HACS Marketplace explainer for what changes, because the menu path differs between versions.
  • A controllable load. A smart plug, EV charger, heat pump input or immersion relay that Home Assistant can switch.

How does Agile pricing work for automations?

Agile rates follow wholesale electricity prices and change every half-hour. Octopus publishes the next day's rates in the late afternoon: its page says unit rates update for the next 24 hours between 4pm and 8pm, usually nearer 4pm. That timing matters, because an automation can only pick the cheapest slots once the prices exist.

Prices can also go negative when supply outstrips demand, which Octopus calls Plunge Pricing, and Price Cap Protect limits spikes to 100p/kWh. Those two facts are why scheduling flexible loads against the rate curve pays off: the gap between the cheapest and dearest half-hours is the saving you are chasing.

Step 1: Install the Octopus Energy integration

Open HACS, search for Octopus Energy by BottlecapDave (it is a HACS default, so no custom repository is needed), download it and restart Home Assistant. The integration is a custom component rather than an official core one, so updates arrive through HACS and not the normal Home Assistant release cycle.

Step 2: Add your Octopus account

Go to Settings, Devices & services, Add integration, choose Octopus Energy and enter your API key and account number. The setup form also lets you set pricing caps, a gas calorific value (default 40), a direct debit rate preference and, if you own one, an Octopus Home Mini.

Once it loads, each electricity meter gets rate entities. The ones you will use are sensor.octopus_energy_electricity_{serial}_{mpan}_current_rate, the matching next_rate sensor, and event entities for the current-day and next-day rates. Write down your meter's MPAN and serial number from the entity names, because you need them in Step 4.

One limit to know about: Octopus's APIs allow 100 calls per hour, shared across everything including the Octopus app. The integration's defaults suit one electricity and one gas meter, so only raise the refresh interval if you run several meters or other Octopus tools.

Step 3: Install Target Timeframes

Back in HACS, download Target Timeframes, also by BottlecapDave, and restart again. It is a separate integration that finds the best periods in any list of time-stamped values, whether that is electricity price, carbon intensity or forecast solar generation. Because it does not care where the numbers come from, it replaced the target rate sensors that used to live inside the Octopus integration.

Step 4: Create a data source for your meter

Add the Target Timeframes integration from Devices & services and create a data source. The name is for your reference; the ID is what matters. If you only want Octopus rates, the migration guide recommends the format octopus_energy_<MPAN>_<serial> using the values from Step 2, and rate data then flows in automatically. Check the Data Source Last Updated sensor to confirm it is populating.

If you want to mix Octopus rates with other data, such as carbon intensity or free-electricity sessions, pick your own ID such as octopus_energy_import and install one of the published blueprints (Octopus Energy default, Octopus with free electricity sessions, Octopus plus Carbon Intensity, or weather). The blueprint automation copies rates into the data source whenever the Octopus entities update. Run it once by hand so data appears straight away.

Step 5: Add a target timeframe sensor

From the data source's menu choose Target timeframe. This creates a binary sensor named binary_sensor.target_timeframes_{data source id}_{name} that turns on during the cheapest periods in a 24-hour window. The settings that matter most:

  • Hours: how much running time you need, in 0.5 steps. A dishwasher cycle might be 2, an overnight car top-up 4.
  • Minimum and maximum time: the window to search. It defaults to 00:00 to 00:00, and if the start is later than the end, the end is treated as the next day, so 20:00 to 05:00 searches overnight.
  • Hours mode: Exact only comes on for the lowest slots up to your hours and stays off if too few exist; Minimum comes on for every qualifying slot; Maximum comes on for whatever it finds if fewer than your hours exist.
  • Offset: shifts the on-time before or after the cheap period, for example -00:30:00 to start charging a robot vacuum half an hour early.
  • Find last applicable values: picks the latest cheap slot, which suits an immersion heater you want hot as late as possible.
Use caseHoursWindowNotes
Dishwasher or washing machine2 to 320:00 to 07:00Continuous slots; see the appliance caveat below
EV top-up3 to 523:00 to 07:00Check your charger can be paused and resumed
Immersion heater1 to 200:00 to 00:00Enable the latest-period option
Battery grid charge2 to 400:00 to 00:00Use Maximum mode so it still runs on dear days

One trap: a sensor will not calculate until every value in its window exists. A 00:00 to 00:00 window therefore waits for the full next-day price list, which arrives in the late afternoon. Narrow the window if you want a decision earlier.

Step 6: Switch a device from the sensor

With the sensor in place, the automation is a single trigger. This example runs a smart plug when the sensor turns on, but only if you have flagged the dishwasher as loaded:

alias: Dishwasher on cheapest Agile slot
triggers:
  - trigger: state
    entity_id: binary_sensor.target_timeframes_octopus_energy_import_dishwasher
    to: "on"
conditions:
  - condition: state
    entity_id: input_boolean.dishwasher_loaded
    state: "on"
actions:
  - action: switch.turn_on
    target:
      entity_id: switch.dishwasher_plug
  - action: input_boolean.turn_off
    target:
      entity_id: input_boolean.dishwasher_loaded

Add a second automation that turns the plug off when the sensor changes to off, or use a plug with an auto-off timer. The input_boolean is a helper you create once; toggle it from your dashboard when you load the machine so the plug is not powered pointlessly every night.

Appliance caveat: cutting mains power only works if the appliance starts a programme when power returns, and many do not. Never cut power mid-cycle on a washing machine or dishwasher full of water. Our smart washing machine guide covers appliances with proper remote start, and our smart plug roundup covers plugs that can safely carry high loads. For cars, an EV charger that Home Assistant can start and stop is far safer than switching the supply.

Why did my old Octopus target rate sensors disappear?

They were removed on purpose. The integration's maintainer recorded a decision to deprecate target rate sensors in favour of Target Timeframes and scheduled removal about six months after the repair notice, around the end of November 2025. The reasons were that one feature was being maintained across several integrations and that other dynamic-tariff suppliers could not use it.

To migrate, create a data source and sensor as above, matching your old hours, window and options, then update automations to point at the new binary_sensor.target_timeframes_... entity. The migration guide notes the options will feel familiar, with a few differences.

Common problems and fixes

The sensor stays off all day: check the Data Source Last Updated sensor. If it is stale, run the blueprint automation by hand. In Exact mode the sensor also stays off when fewer slots than your hours exist inside the window, so widen the window or switch to Maximum.

It picks different slots after tomorrow's prices arrive: that is evaluation mode at work. The default only recalculates once existing target times have passed, while Always can shift the plan mid-run and may leave you short of your hours.

Rates look wrong or blank: confirm the tariff on your account is Agile and the integration entities show current values. If the Octopus app and Home Assistant both poll heavily you can hit the 100 calls per hour limit, so lengthen the refresh interval.

Negative prices: the sensor still treats them as the lowest values, so it will favour those slots, which is usually what you want. Make sure your appliance and tariff terms suit running during them.

What should you automate next?

Once rates and timeframes are in Home Assistant, the same sensor can drive a battery, a heat pump boost or a hot water tank. Pair it with the energy dashboard from our Home Assistant energy monitoring guide to confirm the shifted load actually landed in cheap slots, and compare results against a flat tariff before assuming Agile is saving you money.

Buy the picks in this guide

Recommended for Home Automation

See all devices →

Frequently asked questions

Can Home Assistant automatically use Octopus Agile's cheapest prices?
Yes. Install the community Octopus Energy integration to pull your half-hourly Agile rates into Home Assistant, then install Target Timeframes to turn those rates into a binary sensor that switches on during the cheapest periods. Any automation can trigger from that sensor to start a smart plug, charger or heater. Octopus publishes the next day's Agile rates between 4pm and 8pm, usually nearer 4pm, so the cheapest slots for tomorrow only become known then. Both integrations are community projects installed through HACS rather than official Home Assistant features, so they depend on their maintainers. You also need a working smart meter and an Agile tariff on your account, otherwise the rate entities will not hold useful half-hourly data.
Do the old Octopus target rate sensors still work?
No. The Octopus Energy integration's maintainer decided to deprecate target rate sensors in favour of the separate Target Timeframes integration, with removal planned about six months after the repair notice, around the end of November 2025. If you still have automations that point at an old target rate entity, they will no longer work and need rebuilding. The migration is straightforward: create a Target Timeframes data source for your meter, add a target timeframe sensor with the same hours and window, then point your automations at the new binary sensor. The maintainer's migration guide explains the differences. Older tutorials that mention target rate sensors inside the Octopus integration are out of date, so check the date of any guide you follow.
Is it safe to switch a washing machine on with a smart plug?
It can be, but only for some appliances. Cutting power with a smart plug works if the machine resumes or starts a programme when power returns, and many washing machines and dishwashers do not. Switching mains power off in the middle of a cycle with water in the drum is a bad idea. A safer route is an appliance with a built-in remote start that Home Assistant can trigger, or a plug rated for the load that is only used to power the machine up at the cheap slot, with the programme already selected. Check the appliance manual and the plug's rated current before you automate anything, and never exceed the plug's rating. EV chargers and immersion heaters are usually better candidates than kitchen appliances.

Sources

Sources verified 2026-11-02

  1. Octopus Energy — Agile Octopus: how the half-hourly tariff works
  2. BottlecapDave (GitHub) — Home Assistant Octopus Energy: account setup
  3. BottlecapDave (GitHub) — Octopus Energy integration: deprecation and removal of target rate sensors (ADR 0001)
  4. BottlecapDave (GitHub) — Migrating target rate sensors to Target Timeframes
  5. BottlecapDave (GitHub) — Home Assistant Target Timeframes: target timeframe sensors
  6. BottlecapDave (GitHub) — Target Timeframes blueprints
  7. Simon42 — Home Assistant 2026.11 beta: HACS built in (German)
›How we researched this

Claims in this article are checked against primary sources — manufacturer specifications, official documentation, Which? research, Ofgem guidance, or gov.uk — rather than forum threads or video reviews. Where the author has direct hands-on experience with a product (most Home Assistant, Zigbee, and home-networking gear is running in his own homelab), that is stated explicitly in the text.

For categories outside that personal setup — such as boilers, heat pumps, and other areas that are traditionally a heating engineer's domain — verdicts are built from cross-referenced manufacturer data, published lab results, and vetted expert and owner reviews rather than a claim of personal hands-on testing. See the editorial policy for the full methodology.

Sepehr

Written by

Sepehr

10+ years hands-on with Home Assistant & networking · Research-backed elsewhere · No brand deals

Smart home specialist with 10+ years running a self-hosted Home Assistant setup — Zigbee2MQTT, Frigate NVR, and local-first automations. Independent coverage for UK homes, no brand deals.

LinkedIn →

Citing this page? Please use a dofollow link back to the original article — it helps us keep the data on this page accurate and up to date.

Related reading