Skip to content

Commit db63a32

Browse files
Beta into develop (#1482)
2 parents 5a1441a + f216c19 commit db63a32

File tree

58 files changed

+1545
-768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1545
-768
lines changed

CHANGELOG.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
# [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)
2+
3+
4+
### Bug Fixes
5+
6+
* 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))
7+
8+
9+
### Features
10+
11+
* Updated dispatches diagnostics sensor to include maximum_requests_per_hour (15 minutes dev time) ([a48d7ce](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/a48d7cea2f64e73ceb737e58515b81f60e82b1d4))
12+
13+
# [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)
14+
15+
16+
### Bug Fixes
17+
18+
* Fixed intelligent device type (5 minutes dev time) ([b06bdc0](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/b06bdc0fb9ba3add276ce5d76a1ea529e3685d1d))
19+
* 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))
20+
* 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)
21+
22+
# [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)
23+
24+
25+
### Bug Fixes
26+
27+
* Fixed diagnostics and intelligent devices not loading ([86f024b](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/86f024bd95db64bb23ab85c983ba830d7dfe89f5))
28+
29+
# [17.0.0-beta.1](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/compare/v16.3.1...v17.0.0-beta.1) (2025-09-21)
30+
31+
32+
### blueprints
33+
34+
* Updates extention of blueprints (Thanks [@reedy](https://github.com/reedy)) ([9f3ae03](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/9f3ae03d76d7992d4f1787dbe3c269a5bd794508))
35+
36+
37+
### Bug Fixes
38+
39+
* Fixed repair issues to obfuscate PII information from the key (1.5 hours dev time) ([13d2f42](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/13d2f42e8903030931aca4a0fd1e8c634c8a5c82))
40+
* 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))
41+
* Updated minimum hacs version to 2025.1 ([fa77457](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/fa774577007ee17df21ac488a6679b9f46bbe3b3))
42+
* 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))
43+
44+
45+
### Features
46+
47+
* 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))
48+
* Added repair notice when no rates are retrievable (1.5 hours dev time) ([1dca50b](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/1dca50b124a30e74e9c2581c01ce974876c62de6))
49+
* Added support for multiple EVs (6 hours 5 minutes dev time) ([1c2c3a9](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/1c2c3a967f4208a45daa53f5f57c2e002f63a381))
50+
* 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))
51+
* 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))
52+
53+
54+
### BREAKING CHANGES
55+
56+
* off_peak entity will now turn on during standard off peak rates as well as ad hoc scheduled
57+
dispatches when on intelligent tariff. This is because the naming and behaviour was confusing (off
58+
peak not turning on when in an ad-hoc off peak period). See
59+
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/architecture_decision_records/0002_intelligent_is_dispatching_behaviour_changes
60+
for full details.
61+
* 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)
62+
63+
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.
64+
* 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.
65+
* 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'
66+
* 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.
67+
168
## [16.3.1](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/compare/v16.3.0...v16.3.1) (2025-09-09)
269

370

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# 0001 - Deprecation and removal of Target Rate Sensors in Octopus Energy Integration
2+
3+
## Status
4+
Accepted
5+
6+
## Context
7+
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.
8+
9+
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.
10+
11+
In addition, there are broader automation opportunities beyond energy pricing, such as identifying optimal times for solar generation, that could leverage this functionality.
12+
13+
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.
14+
15+
## Decision
16+
Deprecate and remove target rate sensors from the Octopus Energy integration in favor of the Target Timeframes integration.
17+
18+
- A migration guide has been provided: [Target Timeframes Migration Guide](https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/migrations/target_timeframes/).
19+
- A set of [blueprints](https://bottlecapdave.github.io/HomeAssistant-TargetTimeframes/blueprints/#octopus-energy) for using Octopus Energy data with Target Timeframes is already available.
20+
- A repair notice has been introduced to inform users of the upcoming removal.
21+
- The target rate sensors feature will be removed six months from the notice, around the end of **November 2025**.
22+
23+
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.
24+
25+
## Consequences
26+
27+
### Positive
28+
- Centralizes the feature into a single integration, reducing maintenance overhead.
29+
- Ensures consistent functionality and feature parity across different use cases.
30+
- Provides flexibility for multiple data sources beyond Octopus Energy (dynamic pricing, carbon intensity, solar generation, etc.).
31+
- Protects users from losing the feature if they move away from Octopus Energy.
32+
33+
### Negative
34+
- Users will need to migrate their automations to the Target Timeframes integration.
35+
- Some short-term disruption may occur as users adapt to the new integration.
36+
- Potential gaps in the new integration’s functionality may need to be identified and addressed through community feedback.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# 0002 - Intelligent Is Dispatching behavior changes
2+
3+
## Status
4+
Accepted
5+
6+
## Context
7+
8+
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.
9+
10+
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).
11+
12+
## Decision
13+
14+
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.
15+
16+
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.
17+
18+
## Consequences
19+
20+
### Positive
21+
- Expected behavior based on entity names, which will be easier for new users to understand
22+
- 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
23+
24+
### Negative
25+
- Downstream integrations that rely on existing behavior will need to change
26+
- Users using effected entities will need to update all references
27+
- Some short-term disruption may occur as users adapt to the new entity behaviour.

_docs/blueprints/octopus_energy_manual_intelligent_refresh.yaml

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ blueprint:
77
input:
88
intelligent_dispatches_data_last_retrieved_sensor:
99
name: Intelligent dispatches data last retrieved
10-
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"
10+
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"
1111
selector:
1212
entity:
1313
filter:
@@ -16,7 +16,7 @@ blueprint:
1616

1717
intelligent_dispatches_sensor:
1818
name: Intelligent dispatches
19-
description: "The sensor that determines if intelligent dispatches is active (e.g. binary_sensor.octopus_energy_{{ACCOUNT_ID}}_intelligent_dispatching)"
19+
description: "The sensor that determines if intelligent dispatches is active (e.g. binary_sensor.octopus_energy_{{DEVICE_ID}}_intelligent_dispatching)"
2020
selector:
2121
entity:
2222
filter:
@@ -55,31 +55,59 @@ variables:
5555
millisecond_jitter: >
5656
{{ range(1, 1000) | random }}
5757
58-
mode: queued
59-
max: 4
58+
mode: single
6059
triggers:
6160
- trigger: state
6261
id: car_plugged_in
6362
entity_id: !input car_plugged_in_sensor
6463
to: !input car_plugged_in_sensor_state
64+
- trigger: state
65+
id: car_unplugged
66+
entity_id: !input car_plugged_in_sensor
67+
from: !input car_plugged_in_sensor_state
68+
not_to: !input car_plugged_in_sensor_state
6569
- trigger: time_pattern
70+
id: periodic_check
6671
minutes: "/1"
6772
conditions:
68-
- condition: state
69-
entity_id: !input car_plugged_in_sensor
70-
state: !input car_plugged_in_sensor_state
71-
# Make sure that our dispatches are either due to be updated or our automation was triggered due to the vehicle being plugged in
7273
- condition: or
7374
conditions:
75+
- condition: and
76+
conditions:
77+
- condition: state
78+
entity_id: !input car_plugged_in_sensor
79+
state: !input car_plugged_in_sensor_state
80+
# Make sure that our dispatches are either due to be updated or our automation was triggered due to the vehicle being plugged in
81+
- condition: or
82+
conditions:
83+
- condition: template
84+
value_template: >
85+
{{ trigger.id == "car_plugged_in" }}
86+
- condition: template
87+
value_template: >
88+
{% set next_refresh = state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'next_refresh') %}
89+
{{ next_refresh == None or next_refresh | as_datetime | as_local < now() }}
7490
- condition: template
7591
value_template: >
76-
{{ trigger.id == "car_plugged_in" }}
92+
{{ trigger.id == "car_unplugged" }}
93+
actions:
94+
# Wait 30 seconds to give OE a chance to update the dispatches if caused by car state change
95+
- if:
7796
- condition: template
7897
value_template: >
79-
{{ state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'next_refresh') | as_datetime | as_local < now() }}
80-
actions:
81-
# Wait 30 seconds to give OE a chance to update the dispatches
82-
- delay: 00:00:30
98+
{{ trigger.id != "periodic_check" }}
99+
then:
100+
- delay: 00:00:30
101+
# Wait until we are under the request limit
102+
- wait_template: >-
103+
{% set requests_current_hour = state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'requests_current_hour') %}
104+
{% set maximum_requests_per_hour = state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'maximum_requests_per_hour') %}
105+
{% set request_limits_last_reset = state_attr(intelligent_dispatches_data_last_retrieved_sensor, 'request_limits_last_reset') %}
106+
{{ requests_current_hour == None or
107+
(requests_current_hour | int < maximum_requests_per_hour | int) or
108+
request_limits_last_reset + timedelta(hours=1) < now()
109+
}}
110+
continue_on_timeout: true
83111
# Add a bit of jitter so the API isn't hit at once
84112
- delay:
85113
milliseconds: >
@@ -88,4 +116,4 @@ actions:
88116
target:
89117
entity_id: !input intelligent_dispatches_sensor
90118
- choose: []
91-
default: !input actions
119+
default: !input actions

_docs/entities/diagnostics.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ This sensor states when greenness forecast data was last retrieved.
6464

6565
## Intelligent Dispatches Data Last Retrieved
6666

67-
`sensor.octopus_energy_{{ACCOUNT_ID}}_intelligent_dispatches_data_last_retrieved`
67+
`sensor.octopus_energy_{{DEVICE_ID}}_intelligent_dispatches_data_last_retrieved`
6868

6969
This sensor states when intelligent dispatches data was last retrieved.
7070

@@ -76,10 +76,13 @@ This sensor states when intelligent dispatches data was last retrieved.
7676
| `attempts` | `integer` | The number of attempts that have been made to retrieve the data |
7777
| `next_refresh` | `datetime` | The timestamp of when the data will next be attempted to be retrieved |
7878
| `last_error` | `string` | The error that was raised to cause the last retrieval attempt to fail |
79+
| `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. |
80+
| `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. |
81+
| `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. |
7982

8083
## Intelligent Settings Data Last Retrieved
8184

82-
`sensor.octopus_energy_{{ACCOUNT_ID}}_intelligent_settings_data_last_retrieved`
85+
`sensor.octopus_energy_{{DEVICE_ID}}_intelligent_settings_data_last_retrieved`
8386

8487
This sensor states when intelligent settings data was last retrieved.
8588

_docs/entities/electricity.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,11 @@ Each rate item has the following attributes
147147

148148
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.
149149

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

155-
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.
152+
For intelligent tariffs, this sensor will turn on when you're within active ad hoc dispatching periods as well.
153+
154+
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.
156155

157156
| Attribute | Type | Description |
158157
|-----------|------|-------------|

0 commit comments

Comments
 (0)