Skip to content

Commit 7c3e13a

Browse files
Next release (#1557)
2 parents 8ff865f + 5345a02 commit 7c3e13a

36 files changed

+1272
-166
lines changed

_docs/blueprints.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This blueprint will fire a configured action when the consumption has 24 hours w
2424

2525
### Alert when consumption data is late
2626

27-
[Install blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBottlecapDave%2FHomeAssistant-OctopusEnergy%2Fblob%2Fmain%2F_docs%2Fblueprints%octopus_energy_late_consumption_data.yaml) | [Source](./blueprints/octopus_energy_late_consumption_data.yaml)
27+
[Install blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBottlecapDave%2FHomeAssistant-OctopusEnergy%2Fblob%2Fmain%2F_docs%2Fblueprints%2Foctopus_energy_late_consumption_data.yaml) | [Source](./blueprints/octopus_energy_late_consumption_data.yaml)
2828

2929
This blueprint will fire a configured action when the latest available consumption data is x hours old, where x is configured via the blueprint.
3030

@@ -52,7 +52,7 @@ This blueprint will automatically redeem all redeemable points for account credi
5252

5353
### Alert when current consumption is approaching saving sessions baseline
5454

55-
[Install blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBottlecapDave%2FHomeAssistant-OctopusEnergy%2Fblob%2Fmain%2F_docs%2Fblueprints%octopus_energy_baseline_alert.yaml) | [Source](./blueprints/octopus_energy_baseline_alert.yaml)
55+
[Install blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBottlecapDave%2FHomeAssistant-OctopusEnergy%2Fblob%2Fmain%2F_docs%2Fblueprints%2Foctopus_energy_baseline_alert.yaml) | [Source](./blueprints/octopus_energy_baseline_alert.yaml)
5656

5757
This blueprint will fire a configured action when the consumption for the current interval (i.e. the current 30 minute period) reaches a configured percentage of the saving session baseline.
5858

@@ -62,7 +62,7 @@ This blueprint will fire a configured action when the consumption for the curren
6262

6363
### Alert when current consumption has reached free electricity sessions baseline
6464

65-
[Install blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBottlecapDave%2FHomeAssistant-OctopusEnergy%2Fblob%2Fmain%2F_docs%2Fblueprints%octopus_energy_free_electricity_baseline_reached.yaml) | [Source](./blueprints/octopus_energy_free_electricity_baseline_reached.yaml)
65+
[Install blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBottlecapDave%2FHomeAssistant-OctopusEnergy%2Fblob%2Fmain%2F_docs%2Fblueprints%2Foctopus_energy_free_electricity_baseline_reached.yaml) | [Source](./blueprints/octopus_energy_free_electricity_baseline_reached.yaml)
6666

6767
This blueprint will fire a configured action when the consumption for the current interval (i.e. the current 30 minute period) reaches the current free electricity session baseline.
6868

@@ -74,7 +74,7 @@ This blueprint will fire a configured action when the consumption for the curren
7474

7575
## Manual Intelligent Dispatch Refreshes
7676

77-
[Install blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBottlecapDave%2FHomeAssistant-OctopusEnergy%2Fblob%2Fmain%2F_docs%2Fblueprints%octopus_energy_manual_intelligent_refresh.yaml) | [Source](./blueprints/octopus_energy_manual_intelligent_refresh.yaml)
77+
[Install blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBottlecapDave%2FHomeAssistant-OctopusEnergy%2Fblob%2Fmain%2F_docs%2Fblueprints%2Foctopus_energy_manual_intelligent_refresh.yaml) | [Source](./blueprints/octopus_energy_manual_intelligent_refresh.yaml)
7878

7979
This blueprint will fire the [intelligent dispatches service](./services.md#octopus_energyrefresh_intelligent_dispatches) either when a sensor from another integration determines the car has been plugged in (e.g. the plug status from the [MyEnergi integration](https://github.com/CJNE/ha-myenergi)) or when the data is stale and overdue a refresh (in case the dispatch information has changed).
8080

_docs/entities/electricity.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ This is `on` when you're within your tariff's off peak period, and `off` at all
157157

158158
* OHME
159159

160+
!!! note
161+
162+
Sensor came on when you did/didn't expected it to and you're on an intelligent tariff? You can see what the state of your dispatches were at the time by using the [get_point_in_time_intelligent_dispatch_history service](../services.md#octopus_energyget_point_in_time_intelligent_dispatch_history)
163+
160164
| Attribute | Type | Description |
161165
|-----------|------|-------------|
162166
| `current_start` | `datetime` | The date/time when the off peak rate started |

_docs/entities/greenness_forecast.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Greenness Forecast
22

3-
To support the [greenness forecast](https://octopus.energy/smart/greener-days/) supported by Octopus Energy, the following entities are provided.
3+
To support the [greener nights](https://octopus.energy/smart/greener-nights/) supported by Octopus Energy, the following entities are provided.
44

55
## Current Index
66

@@ -87,4 +87,45 @@ For `current`, the following attributes are provided
8787

8888
!!! info
8989

90-
You can use the [data_last_retrieved sensor](./diagnostics.md#greenness-forecast-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
90+
You can use the [data_last_retrieved sensor](./diagnostics.md#greenness-forecast-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
91+
92+
## Greener Nights Calendar
93+
94+
`calendar.octopus_energy_{{ACCOUNT_ID}}_greener_nights`
95+
96+
Read only [calendar](https://www.home-assistant.io/integrations/calendar) sensor to record nights that are highlighted as "greener nights". Will be `on` when a greener night is active. Calendar events will be automatically added/removed by the integration when greener nights are discovered.
97+
98+
Standard calendar attributes will indicate the current/next highlighted greener night.
99+
100+
!!! warning
101+
102+
The sensor does not store past events indefinitely. Past events could be removed without notice.
103+
104+
!!! info
105+
106+
You can use the [data_last_retrieved sensor](./diagnostics.md#greenness-forecast-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
107+
108+
| Attribute | Type | Description |
109+
|-----------|------|-------------|
110+
| `greenness_index` | `int` | The index for the current/next forecast |
111+
| `greenness_score` | `string` | The score associated by Octopus Energy for the current/next forecast |
112+
113+
### Automation Example
114+
115+
Below is an example of raising a persistent notification 5 minutes before a saving session starts.
116+
117+
```yaml
118+
triggers:
119+
- trigger: calendar
120+
entity_id: calendar.octopus_energy_{{ACCOUNT_ID}}_greener_nights
121+
event: start
122+
offset: -00:05:00
123+
actions:
124+
- action: persistent_notification.create
125+
data:
126+
title: Greener Night Starting
127+
message: >
128+
{% set minutes = ((state_attr(trigger.entity_id, 'end_time') | as_datetime - state_attr(trigger.entity_id, 'start_time') | as_datetime).seconds / 60) | round(0) | string %}
129+
{% set start_time = (state_attr(trigger.entity_id, 'start_time') | as_datetime).strftime('%H:%M') %}
130+
Greener night starts at {{ start_time }} for {{ minutes }} minutes.
131+
```

_docs/entities/intelligent.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ This sensor is used to determine if you're within a dispatching period (i.e. "sm
1414

1515
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.
1616

17-
!!! info
18-
19-
This sensor will only turn on during dispatches for a single intelligent device. If you're after a sensor that turns on during the standard off peak rates as well or cover multiple intelligent devices then you're best to use the [off peak sensor](./electricity.md#off-peak).
20-
2117
!!! warning
2218

2319
If you are using this to drive other automations for cheap rates (e.g. to fill batteries), you should perform additional checks to make sure your vehicle is actually charging. If it isn't, this sensor could be incorrectly on if during a dispatch outside of the standard off peak period and you will therefore not receive the off peak rate.
@@ -32,6 +28,14 @@ Depending on your [account configuration](../setup/account.md#intelligent-rates-
3228

3329
If you are supplied by one of the above providers, this sensor will never turn on.
3430

31+
!!! info
32+
33+
This sensor will only turn on during dispatches for a single intelligent device. If you're after a sensor that turns on during the standard off peak rates as well or cover multiple intelligent devices then you're best to use the [off peak sensor](./electricity.md#off-peak).
34+
35+
!!! note
36+
37+
Sensor came on when you did/didn't expected it to? You can see what the state of your dispatches were at the time by using the [get_point_in_time_intelligent_dispatch_history service](../services.md#octopus_energyget_point_in_time_intelligent_dispatch_history)
38+
3539
| Attribute | Type | Description |
3640
|-----------|------|-------------|
3741
| `planned_dispatches` | `array` | An array of the dispatches that are currently planned by Octopus Energy. |

_docs/entities/octoplus.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ Determines the current Octoplus points balance. This sensor will only be availab
1616
| `redeemable_points` | `integer` | The number of points that can be redeemed into account credit |
1717
| `data_last_retrieved` | `datetime` | The date/time the underlying data was last retrieved from Octopus Energy APIs |
1818

19-
## Saving Sessions
19+
## Octopus Saving Sessions
20+
21+
These sensors are for [Octopus Saving Sessions](https://octopus.energy/saving-sessions/).
22+
23+
### Saving Sessions
2024

2125
!!! warning
2226

@@ -39,7 +43,7 @@ Binary sensor to indicate if a saving session that the account has joined is act
3943

4044
You can use the [data_last_retrieved sensor](./diagnostics.md#saving-sessions-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
4145

42-
## Saving Sessions Calendar
46+
### Saving Sessions Calendar
4347

4448
`calendar.octopus_energy_{{ACCOUNT_ID}}_octoplus_saving_sessions`
4549

@@ -55,7 +59,7 @@ Standard calendar attributes will indicate the current/next saving session.
5559

5660
You can use the [data_last_retrieved sensor](./diagnostics.md#saving-sessions-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
5761

58-
### Automation Example
62+
#### Automation Example
5963

6064
Below is an example of raising a persistent notification 5 minutes before a saving session starts.
6165

@@ -75,7 +79,7 @@ actions:
7579
Saving session starts at {{ start_time }} for {{ minutes }} minutes.
7680
```
7781
78-
## Saving Session Events
82+
### Saving Session Events
7983
8084
`event.octopus_energy_{{ACCOUNT_ID}}_octoplus_saving_session_events`
8185

@@ -111,7 +115,7 @@ Each joined event item will include the following attributes
111115
| `rewarded_octopoints` | `integer` | The total number of octopoints that were awarded (if any or known) |
112116
| `octopoints_per_kwh` | `integer` | The number of octopoints that are/were awarded per kwh saved during the event (if known) |
113117

114-
## Saving Session Baseline
118+
### Saving Session Baseline
115119

116120
`sensor.octopus_energy_electricity_{{METER_SERIAL_NUMBER}}_{{MPAN_NUMBER}}_octoplus_saving_session_baseline`
117121

@@ -159,7 +163,11 @@ Each item within `baselines` consists of the following attributes
159163

160164
You can use the [data_last_retrieved sensor](./diagnostics.md#saving-sessions-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
161165

162-
## Free Electricity Sessions
166+
## Octopus Free Electricity
167+
168+
These sensors are for [Octopus Free Electricity](https://octopus.energy/free-electricity/).
169+
170+
### Free Electricity Sessions
163171

164172
!!! warning
165173

@@ -188,7 +196,7 @@ Binary sensor to indicate if a free electricity session is active.
188196

189197
You can use the [data_last_retrieved sensor](./diagnostics.md#free-electricity-sessions-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
190198

191-
## Free Electricity Sessions Calendar
199+
### Free Electricity Sessions Calendar
192200

193201
`calendar.octopus_energy_{{ACCOUNT_ID}}_octoplus_free_electricity_session`
194202

@@ -210,7 +218,7 @@ Standard calendar attributes will indicate the current/next saving session.
210218

211219
You can use the [data_last_retrieved sensor](./diagnostics.md#free-electricity-sessions-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
212220

213-
### Automation Example
221+
#### Automation Example
214222

215223
Below is an example of raising a persistent notification 5 minutes before a free electricity session starts.
216224

@@ -230,7 +238,7 @@ actions:
230238
Free electricity session starts at {{ start_time }} for {{ minutes }} minutes.
231239
```
232240

233-
## Free Electricity Session Events
241+
### Free Electricity Session Events
234242

235243
`event.octopus_energy_{{ACCOUNT_ID}}_octoplus_free_electricity_session_events`
236244

@@ -255,7 +263,7 @@ Each item in the `events` attribute will include the following attributes
255263
| `end` | `datetime` | The date/time the event starts |
256264
| `duration_in_minutes` | `integer` | The duration of the event in minutes |
257265

258-
## Free Electricity Session Baseline
266+
### Free Electricity Session Baseline
259267

260268
`sensor.octopus_energy_electricity_{{METER_SERIAL_NUMBER}}_{{MPAN_NUMBER}}_octoplus_free_electricity_session_baseline`
261269

_docs/faq.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,25 @@ where states_meta.entity_id = 'binary_sensor.octopus_energy_xxx_intelligent_disp
221221
order by last_updated_ts desc
222222
```
223223

224+
## I was expecting the saving session/free electricity session sensor to turn on during a period, but it didn't. Is there a reason for this?
225+
226+
One thing that people get confused about these sensors is that they represent two different programs held by Octopus, and recently Octopus have sometimes been confusing the messaging around these programs (e.g. at the time of writing one is implied to be a subset of the other).
227+
228+
Saving session sensors are in relation to [Octopus Saving Sessions](https://octopus.energy/saving-sessions/). These sessions are about using **less** energy that you normally use, where any energy saved is credited back to your account in the form of octopoints. These sessions typically occur within the winter when renewable energy is low.
229+
230+
Free electricity session sensors are in relation to [Octopus Free Electricity](https://octopus.energy/free-electricity/). These sessions are about using **more** energy than you normally use, where any energy used above your standard consumption is credited back to your account, basically making that excess energy free. These sessions typically occur when there's an excess of renewable energy (e.g. high wind).
231+
232+
If you think the sensor is still not coming on when it should, then please raise any issue.
233+
234+
## Current rate sensors were not zero during a free electricity session. Is this expected?
235+
236+
The current rate sensor will not be adjusted during free electricity sessions. This is by design, for a couple of reasons
237+
238+
1. The electricity price is only £0 for any electricity that you use within each applicable 30 minute period that is above your average consumption for that period. Therefore you are still charged the standard rate for any consumption below or equal to this average consumption. So the entire period is not technically free and so changing the rate sensor in my opinion is misleading.
239+
2. The electricity is charged at your standard rate and then credited back. This means that while any electricity is technically free over your consumption, you are still "billed" at your standard rate. Because of this latter reason, to my knowledge none of the OE charts take this into account and the cost sensors are designed to match as close as possible to the costs appearing on the website when you look at your history.
240+
241+
There are no plans to change this. If you are wanting to drive automations, it is advised to use the [free electricity sensor](./entities/octoplus.md#free-electricity-sessions-calendar) for these situations.
242+
224243
## Do you support older versions of the integration?
225244

226245
Due to time constraints, I will only ever support the latest version of the integration. If you have an issue with an older version of the integration, my initial answer will always be to update to the latest version. This might be different to what HACS is reporting if you are not on the minimum supported Home Assistant version (which is highlighted in each release's changelog).

_docs/services.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,25 @@ Refreshes intelligent dispatches for a given account.
308308

309309
For an automation example, please refer to the available [blueprint](./blueprints.md#manual-intelligent-dispatch-refreshes).
310310

311+
### octopus_energy.get_point_in_time_intelligent_dispatch_history
312+
313+
Retrieve the intelligent dispatch history which was active for a given point in time based on up to the last 48 hours of intelligent dispatches that have been captured locally. This can be used to determine why [is dispatching](./entities/intelligent.md#is-dispatching) or [off peak](./entities/electricity.md#off-peak) might have turned on during a certain time period.
314+
315+
!!! info
316+
317+
The OE API doesn't provide historic intelligent dispatch information, so this information is stored locally as it changes. Therefore depending on how often your dispatch information refreshes, it can take a while for data to become available.
318+
319+
!!! note
320+
321+
The data that powers this service is available at `config/.storage/octopus_energy.intelligent_dispatches_history_{{DEVICE_ID}}`
322+
323+
324+
| Attribute | Optional | Description |
325+
| ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------- |
326+
| `target.entity_id` | `no` | The [dispatching](./entities/intelligent.md#is-dispatching) entity that you want to refresh the content for (e.g. `binary_sensor.octopus_energy_{{DEVICE_ID}}_intelligent_dispatching`). |
327+
| `data.point_in_time` | `no` | The point in time to get the historic dispatch information that was active at the time.
328+
329+
311330
## Miscellaneous
312331

313332
### octopus_energy.purge_invalid_external_statistic_ids

0 commit comments

Comments
 (0)