Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1c2c3a9
feat: Added support for multiple EVs (6 hours 5 minutes dev time)
BottlecapDave Sep 21, 2025
18e3eca
feat: Updated off peak sensor to come on when intelligent devices are…
BottlecapDave Sep 21, 2025
6f4d5e4
feat: Added attribute to dispatch entity to determine if manual refre…
BottlecapDave Sep 21, 2025
99866c5
release: Released v17.0.0-beta.1 [skip ci]
semantic-release-bot Sep 21, 2025
86f024b
fix: Fixed diagnostics and intelligent devices not loading
BottlecapDave Sep 21, 2025
857be23
Merge branch 'feat/intelligent-changes' into beta
BottlecapDave Sep 21, 2025
f4d8b5f
release: Released v17.0.0-beta.2 [skip ci]
semantic-release-bot Sep 21, 2025
47df036
octopus_energy_manual_intelligent_refresh.yaml: Use DEVICE_ID
reedy Sep 22, 2025
07dc0dd
services.md: Use DEVICE_ID
reedy Sep 22, 2025
72c2965
fix: Fixed issue where off peak rates flipped when multiple dispatch …
BottlecapDave Sep 22, 2025
29c00b6
chore: Updated mock data
BottlecapDave Sep 23, 2025
b06bdc0
fix: Fixed intelligent device type (5 minutes dev time)
BottlecapDave Sep 23, 2025
059a892
docs: Added new positive to intelligent dispatching behaviour change
BottlecapDave Sep 24, 2025
9064c64
Merge branch 'develop' into feat/intelligent-changes
BottlecapDave Sep 24, 2025
e040287
Feat/intelligent changes (#1474)
BottlecapDave Sep 24, 2025
2cca6c1
docs: Use DEVICE_ID for intelligent sensors (#1477)
BottlecapDave Sep 24, 2025
f3f89fa
release: Released v17.0.0-beta.3 [skip ci]
semantic-release-bot Sep 24, 2025
fd74794
fix: Fixed issue where intelligent maximum hourly calls check was bei…
BottlecapDave Sep 28, 2025
a48d7ce
feat: Updated dispatches diagnostics sensor to include maximum_reques…
BottlecapDave Sep 28, 2025
525c9f3
blueprint: Fixed manual intelligent refresh blueprint to handle next_…
BottlecapDave Sep 28, 2025
ee75ec6
blueprint: Updated manual intelligent refresh blueprint to not go ove…
BottlecapDave Sep 28, 2025
2462dff
blueprint: Updated manual intelligent blueprint to refresh dispatches…
BottlecapDave Sep 28, 2025
f1ebf1a
Feat/intelligent changes (#1488)
BottlecapDave Sep 28, 2025
40c3eab
release: Released v17.0.0-beta.4 [skip ci]
semantic-release-bot Sep 28, 2025
f216c19
Merge branch 'develop' into beta
BottlecapDave Oct 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,70 @@
# [17.0.0-beta.4](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/compare/v17.0.0-beta.3...v17.0.0-beta.4) (2025-09-28)


### Bug Fixes

* Fixed issue where intelligent maximum hourly calls check was being checked when data wasn't due to be refreshed ([fd74794](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/fd74794d508548f071d1ceb1f16065cbdb020103))


### Features

* Updated dispatches diagnostics sensor to include maximum_requests_per_hour (15 minutes dev time) ([a48d7ce](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/a48d7cea2f64e73ceb737e58515b81f60e82b1d4))

# [17.0.0-beta.3](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/compare/v17.0.0-beta.2...v17.0.0-beta.3) (2025-09-24)


### Bug Fixes

* Fixed intelligent device type (5 minutes dev time) ([b06bdc0](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/b06bdc0fb9ba3add276ce5d76a1ea529e3685d1d))
* Fixed issue where off peak rates flipped when multiple dispatch sources exist where one source is active and one isn't (1 hour dev time) ([72c2965](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/72c29651bf421a5934f02c988aadc0e865e1f91d))
* Incorrect number of arguments to async_create_issue ([0ad38cf](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/0ad38cfba6a2d89a552085432302136b7689fd6d)), closes [#1479](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/1479)

# [17.0.0-beta.2](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/compare/v17.0.0-beta.1...v17.0.0-beta.2) (2025-09-21)


### Bug Fixes

* Fixed diagnostics and intelligent devices not loading ([86f024b](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/86f024bd95db64bb23ab85c983ba830d7dfe89f5))

# [17.0.0-beta.1](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/compare/v16.3.1...v17.0.0-beta.1) (2025-09-21)


### blueprints

* Updates extention of blueprints (Thanks [@reedy](https://github.com/reedy)) ([9f3ae03](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/9f3ae03d76d7992d4f1787dbe3c269a5bd794508))


### Bug Fixes

* Fixed repair issues to obfuscate PII information from the key (1.5 hours dev time) ([13d2f42](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/13d2f42e8903030931aca4a0fd1e8c634c8a5c82))
* Updated heat pump water heater to use valid state to represent 'on' (30 minutes dev time) ([ae0b73d](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/ae0b73d839d348b96657f63e1ae10e01c591b577))
* Updated minimum hacs version to 2025.1 ([fa77457](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/fa774577007ee17df21ac488a6679b9f46bbe3b3))
* Updated minimum hacs version to 2025.1 ([#1465](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/1465)) ([39b9032](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/39b90320eedb1edf164919ae6bf6820cfe1e4c73))


### Features

* Added attribute to dispatch entity to determine if manual refreshing of dispatches is enabled (10 minutes dev time) ([6f4d5e4](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/6f4d5e4e3f9c493177b7660d3c80f647c3496164))
* Added repair notice when no rates are retrievable (1.5 hours dev time) ([1dca50b](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/1dca50b124a30e74e9c2581c01ce974876c62de6))
* Added support for multiple EVs (6 hours 5 minutes dev time) ([1c2c3a9](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/1c2c3a967f4208a45daa53f5f57c2e002f63a381))
* Updated off peak sensor to come on when intelligent devices are dispatching (30 minutes dev time) ([18e3eca](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/18e3eca01e21c9d63d0b30b78d01c70807bde5dd))
* Updated raised errors for heat pump and intelligent controls to be more user friendly (2 hours dev time) ([e60ce63](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/e60ce637641dc1d570602aa3121d79b79b69092a))


### BREAKING CHANGES

* off_peak entity will now turn on during standard off peak rates as well as ad hoc scheduled
dispatches when on intelligent tariff. This is because the naming and behaviour was confusing (off
peak not turning on when in an ad-hoc off peak period). See
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/architecture_decision_records/0002_intelligent_is_dispatching_behaviour_changes
for full details.
* Intelligent device related entity ids have been changed from including the account id to including the device id. This is to support multiple EVs as well as other future intelligent devices OE might want to add in the future (e.g. Snug)

is_dispatching entity will now only show when the car is within a scheduled dispatching period. It will no longer turn on when within the standard off peak period. This is because the naming and behaviour was confusing with the name (on when it's not dispatching) and behavior in conjunction with the off peak sensor (off peak not turning on when in an ad-hoc off peak period). See https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/architecture_decision_records/0002_intelligent_is_dispatching_behaviour_changes for full details.
* If you are using blueprints provided by this integration, you will need to re-import them and potentially update automations in order to continue receiving updates.
* If you have automations that look at the heat pump water heater, then you'll need to update any reference to the state of 'on' to 'electric'
* Due to repair issue key structure changing, you may receive repair notices that you have previously ignored. You will need to ignore them again to hide them.

## [16.3.1](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/compare/v16.3.0...v16.3.1) (2025-09-09)


Expand Down
36 changes: 36 additions & 0 deletions _docs/architecture_decision_records/0001_target_rates_removal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 0001 - Deprecation and removal of Target Rate Sensors in Octopus Energy Integration

## Status
Accepted

## Context
Target rate sensors are currently a core feature of the Octopus Energy integration. A variation of this feature was also introduced into the [Carbon Intensity integration](https://github.com/BottlecapDave/HomeAssistant-CarbonIntensity), where carbon emissions were used instead of price.

Maintaining this feature across multiple integrations has become problematic, as it requires ongoing effort to ensure feature parity. Meanwhile, more energy providers are emerging with dynamic pricing models similar to Octopus Energy that cannot benefit from the existing implementation.

In addition, there are broader automation opportunities beyond energy pricing, such as identifying optimal times for solar generation, that could leverage this functionality.

To address these issues, a new integration, [Target Timeframes](https://bottlecapdave.github.io/HomeAssistant-TargetTimeframes/), has been developed. It abstracts the concept of selecting optimal timeframes from the data source, allowing it to work with any metric (price, carbon intensity, generation, etc.). This ensures long-term viability and avoids duplication of effort across multiple integrations.

## Decision
Deprecate and remove target rate sensors from the Octopus Energy integration in favor of the Target Timeframes integration.

- A migration guide has been provided: [Target Timeframes Migration Guide](https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/migrations/target_timeframes/).
- A set of [blueprints](https://bottlecapdave.github.io/HomeAssistant-TargetTimeframes/blueprints/#octopus-energy) for using Octopus Energy data with Target Timeframes is already available.
- A repair notice has been introduced to inform users of the upcoming removal.
- The target rate sensors feature will be removed six months from the notice, around the end of **November 2025**.

The Carbon Intensity integration has already removed its variation due to a smaller user base. Given the higher user count of Octopus Energy, this proposal is being [made openly](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/discussions/1305) before proceeding.

## Consequences

### Positive
- Centralizes the feature into a single integration, reducing maintenance overhead.
- Ensures consistent functionality and feature parity across different use cases.
- Provides flexibility for multiple data sources beyond Octopus Energy (dynamic pricing, carbon intensity, solar generation, etc.).
- Protects users from losing the feature if they move away from Octopus Energy.

### Negative
- Users will need to migrate their automations to the Target Timeframes integration.
- Some short-term disruption may occur as users adapt to the new integration.
- Potential gaps in the new integration’s functionality may need to be identified and addressed through community feedback.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 0002 - Intelligent Is Dispatching behavior changes

## Status
Accepted

## Context

The Octopus Intelligent feature was heavily based on an [existing integration](https://github.com/megakid/ha_octopus_intelligent), with [an original proposal from author](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/114). This resulted in the intelligent based entity behavior being identical to the existing integration.

Since inception, this integration has evolved and resulted in other sensors (i.e. [off peak](../entities/electricity.md#off-peak)) which have brought some inconsistencies in naming compared to behaviour (e.g. not turning on for **all** off peak times). Some of the intelligent sensors have also had inconsistencies in naming compared to behaviour (e.g. dispatching sensor turning on during standard off peak when the device isn't scheduled to be charged).

## Decision

The [Is Dispatching entity](../entities/intelligent.md#is-dispatching) will have its behaviour updated to only turn on when during a planned/scheduled dispatch period and the state of the intelligent device is in a "scheduled" mode.

The [Off peak entity](../entities/electricity.md#off-peak) will have its behaviour updated to turn on whenever an off peak rate is active. In the case of intelligent tariffs this will be during the standard off peak times (23:30-05:30 at time of writing) or when a planned/scheduled dispatch is active and the state of the intelligent device is in a "scheduled" mode.

## Consequences

### Positive
- Expected behavior based on entity names, which will be easier for new users to understand
- Automations built around running off peak will continue to work as expected when moving from/to intelligent tariffs when using the off peak sensor with the new behaviour

### Negative
- Downstream integrations that rely on existing behavior will need to change
- Users using effected entities will need to update all references
- Some short-term disruption may occur as users adapt to the new entity behaviour.
56 changes: 42 additions & 14 deletions _docs/blueprints/octopus_energy_manual_intelligent_refresh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ blueprint:
input:
intelligent_dispatches_data_last_retrieved_sensor:
name: Intelligent dispatches data last retrieved
description: "The sensor that determines when intelligent dispatches data was last retrieved (e.g. sensor.octopus_energy_{{ACCOUNT_ID}}_intelligent_dispatches_data_last_retrieved). More information can be found at https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/entities/diagnostics/#intelligent-dispatches-data-last-retrieved"
description: "The sensor that determines when intelligent dispatches data was last retrieved (e.g. sensor.octopus_energy_{{DEVICE_ID}}_intelligent_dispatches_data_last_retrieved). More information can be found at https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/entities/diagnostics/#intelligent-dispatches-data-last-retrieved"
selector:
entity:
filter:
Expand All @@ -16,7 +16,7 @@ blueprint:

intelligent_dispatches_sensor:
name: Intelligent dispatches
description: "The sensor that determines if intelligent dispatches is active (e.g. binary_sensor.octopus_energy_{{ACCOUNT_ID}}_intelligent_dispatching)"
description: "The sensor that determines if intelligent dispatches is active (e.g. binary_sensor.octopus_energy_{{DEVICE_ID}}_intelligent_dispatching)"
selector:
entity:
filter:
Expand Down Expand Up @@ -55,31 +55,59 @@ variables:
millisecond_jitter: >
{{ range(1, 1000) | random }}

mode: queued
max: 4
mode: single
triggers:
- trigger: state
id: car_plugged_in
entity_id: !input car_plugged_in_sensor
to: !input car_plugged_in_sensor_state
- trigger: state
id: car_unplugged
entity_id: !input car_plugged_in_sensor
from: !input car_plugged_in_sensor_state
not_to: !input car_plugged_in_sensor_state
- trigger: time_pattern
id: periodic_check
minutes: "/1"
conditions:
- condition: state
entity_id: !input car_plugged_in_sensor
state: !input car_plugged_in_sensor_state
# Make sure that our dispatches are either due to be updated or our automation was triggered due to the vehicle being plugged in
- condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: !input car_plugged_in_sensor
state: !input car_plugged_in_sensor_state
# Make sure that our dispatches are either due to be updated or our automation was triggered due to the vehicle being plugged in
- condition: or
conditions:
- condition: template
value_template: >
{{ trigger.id == "car_plugged_in" }}
- condition: template
value_template: >
{% set next_refresh = state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'next_refresh') %}
{{ next_refresh == None or next_refresh | as_datetime | as_local < now() }}
- condition: template
value_template: >
{{ trigger.id == "car_plugged_in" }}
{{ trigger.id == "car_unplugged" }}
actions:
# Wait 30 seconds to give OE a chance to update the dispatches if caused by car state change
- if:
- condition: template
value_template: >
{{ state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'next_refresh') | as_datetime | as_local < now() }}
actions:
# Wait 30 seconds to give OE a chance to update the dispatches
- delay: 00:00:30
{{ trigger.id != "periodic_check" }}
then:
- delay: 00:00:30
# Wait until we are under the request limit
- wait_template: >-
{% set requests_current_hour = state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'requests_current_hour') %}
{% set maximum_requests_per_hour = state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'maximum_requests_per_hour') %}
{% set request_limits_last_reset = state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'request_limits_last_reset') %}
{{ requests_current_hour == None or
(requests_current_hour | int < maximum_requests_per_hour | int) or
request_limits_last_reset + timedelta(hours=1) < now()
}}
continue_on_timeout: true
# Add a bit of jitter so the API isn't hit at once
- delay:
milliseconds: >
Expand All @@ -88,4 +116,4 @@ actions:
target:
entity_id: !input intelligent_dispatches_sensor
- choose: []
default: !input actions
default: !input actions
7 changes: 5 additions & 2 deletions _docs/entities/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This sensor states when greenness forecast data was last retrieved.

## Intelligent Dispatches Data Last Retrieved

`sensor.octopus_energy_{{ACCOUNT_ID}}_intelligent_dispatches_data_last_retrieved`
`sensor.octopus_energy_{{DEVICE_ID}}_intelligent_dispatches_data_last_retrieved`

This sensor states when intelligent dispatches data was last retrieved.

Expand All @@ -76,10 +76,13 @@ This sensor states when intelligent dispatches data was last retrieved.
| `attempts` | `integer` | The number of attempts that have been made to retrieve the data |
| `next_refresh` | `datetime` | The timestamp of when the data will next be attempted to be retrieved |
| `last_error` | `string` | The error that was raised to cause the last retrieval attempt to fail |
| `requests_current_hour` | `integer` | The number of requests that have been made during the current hour. The start of the hour starts when the first request is made. |
| `maximum_requests_per_hour` | `integer` | The maximum number of requests that can be made during an hour. The start of the hour starts when the first request is made. |
| `request_limits_last_reset` | `datetime` | The datetime when the request limits were last reset. This will reset when a request is made and is within the designated limits. |

## Intelligent Settings Data Last Retrieved

`sensor.octopus_energy_{{ACCOUNT_ID}}_intelligent_settings_data_last_retrieved`
`sensor.octopus_energy_{{DEVICE_ID}}_intelligent_settings_data_last_retrieved`

This sensor states when intelligent settings data was last retrieved.

Expand Down
7 changes: 3 additions & 4 deletions _docs/entities/electricity.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,11 @@ Each rate item has the following attributes

This is `on` when you're within your tariff's off peak period, and `off` at all other times. This will only be work if you're on a tariff with an off peak period.

!!! note
This is [disabled by default](../faq.md#there-are-entities-that-are-disabled-why-are-they-disabled-and-how-do-i-enable-them).

!!! warning

For intelligent tariffs, this sensor will only turn on during the standard off peak period. If you are wanting to know when extended off peak rates are available, you'll want to use the [is dispatching](./intelligent.md#is-dispatching) sensor.
For intelligent tariffs, this sensor will turn on when you're within active ad hoc dispatching periods as well.

Depending on your [account configuration](../setup/account.md#intelligent-rates-mode), what is determined as an active dispatching period will change. If you have configured to accept [planned or started dispatches](../setup/account.md#planned-and-started-dispatches-will-turn-into-off-peak-rates), then the sensor will turn on when you're are within an active planned or started dispatch period. If you have configured to accept [only started dispatches](../setup/account.md#only-started-dispatches-will-turn-into-off-peak-rates), then the sensor will turn on when you're are within an active started dispatch period, but not planned dispatch.

| Attribute | Type | Description |
|-----------|------|-------------|
Expand Down
Loading
Loading