Skip to content

Commit 7f37b2b

Browse files
Next release (#1524)
2 parents baf87db + 60672f4 commit 7f37b2b

File tree

10 files changed

+106
-27
lines changed

10 files changed

+106
-27
lines changed

CHANGELOG.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
* 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))
1616
* 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))
1717
* Fixed repair issues to obfuscate PII information from the key (1.5 hours dev time) ([13d2f42](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/13d2f42e8903030931aca4a0fd1e8c634c8a5c82))
18-
* 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)
18+
* 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) (Thanks @TCWORLD)
1919
* Updated cost trackers to handle entities with non-string unique_ids (Thanks [@dpwood](https://github.com/dpwood)) ([5c32d16](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/5c32d16ca0084dc76da363bba7d8e16340454787))
2020
* 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))
21-
* Updated minimum hacs version to 2025.1 ([fa77457](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/fa774577007ee17df21ac488a6679b9f46bbe3b3))
22-
* 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))
21+
* Updated minimum hacs version to 2025.1 (Thanks @johncuthbertuk) ([fa77457](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/fa774577007ee17df21ac488a6679b9f46bbe3b3))
2322

2423

2524
### Features
@@ -32,7 +31,6 @@
3231
* Attached intelligent diagnostic sensors to intelligent device (15 minutes dev time) ([b0ca7d1](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/b0ca7d11c6f76a69921fb5f6b0ad542d6ccf634e))
3332
* Updated dispatches diagnostics sensor to include maximum_requests_per_hour (15 minutes dev time) ([a48d7ce](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/a48d7cea2f64e73ceb737e58515b81f60e82b1d4))
3433
* Updated electricity and gas rate sensors to be measurements classes to match rate sensors in other native integrations and provide min/max/average stats (30 minutes dev time) ([4a7305e](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/4a7305e7924ba483357d95ba6e75d3cd053ee7f9))
35-
* Updated electricity/gas/heat pump/octoplus diagnostic entities so they're attached to the correct devices (1 hour dev time) ([af0c285](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/af0c285675aebd10085f3d65b4f6c4897d9b4f34))
3634
* Updated electricity/gas/heat pump/octoplus diagnostic entities so they're attached to the correct devices (1 hour dev time) ([#1497](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/1497)) ([2ce05ed](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/commit/2ce05ed738c0ad3c6c71776fd7c1b73058e7de29))
3735
* 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))
3836
* 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))
@@ -46,9 +44,8 @@ peak not turning on when in an ad-hoc off peak period). See
4644
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/architecture_decision_records/0002_intelligent_is_dispatching_behaviour_changes
4745
for full details.
4846
* 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)
49-
50-
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.
51-
* 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.
47+
* 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.
48+
* 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. Please note the extensions for blueprints have changed from `.yml` to `.yaml`
5249
* 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'
5350
* 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.
5451

_docs/entities/electricity.md

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

154154
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.
155155

156+
This above does not apply and will not come on outside of the standard off peak hours for the following intelligent providers
157+
158+
* OHME
159+
156160
| Attribute | Type | Description |
157161
|-----------|------|-------------|
158162
| `current_start` | `datetime` | The date/time when the off peak rate started |

_docs/entities/intelligent.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ If you are on the [intelligent tariff](https://octopus.energy/smart/intelligent-
66

77
If you switch to the intelligent tariff after you have installed the integration, you will need to reload the integration or restart your Home Assistant instance. You will also need to do this if you re-onboard.
88

9-
### Is Dispatching
9+
## Is Dispatching
1010

1111
`binary_sensor.octopus_energy_{{DEVICE_ID}}_intelligent_dispatching`
1212

@@ -75,7 +75,7 @@ Each item in `started_dispatch` have the following attributes
7575

7676
You can use the [data_last_retrieved sensor](./diagnostics.md#intelligent-dispatches-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
7777

78-
### Current State
78+
## Current State
7979

8080
`sensor.octopus_energy_{{DEVICE_ID}}_intelligent_state`
8181

@@ -96,7 +96,7 @@ This sensor displays the current state of your intelligent provider as told by t
9696
* `LOST_CONNECTION` - lost connection to the device, ready to re-auth (if not temporary / automatic fix).
9797
* `RETIRED` - / de-authed (re-auth not possible, re-register device to onboard again).
9898

99-
### Bump Charge
99+
## Bump Charge
100100

101101
`switch.octopus_energy_{{DEVICE_ID}}_intelligent_bump_charge`
102102

@@ -112,7 +112,7 @@ This sensor is used to turn on/off bump ("on-demand") charging for a **single**
112112

113113
You can use the [data_last_retrieved sensor](./diagnostics.md#intelligent-settings-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
114114

115-
### Smart Charge
115+
## Smart Charge
116116

117117
`switch.octopus_energy_{{DEVICE_ID}}_intelligent_smart_charge`
118118

@@ -128,7 +128,7 @@ This sensor is used to turn on/off intelligent smart charging for a **single** i
128128

129129
You can use the [data_last_retrieved sensor](./diagnostics.md#intelligent-settings-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
130130

131-
### Charge Target
131+
## Charge Target
132132

133133
`number.octopus_energy_{{DEVICE_ID}}_intelligent_charge_target`
134134

@@ -144,7 +144,7 @@ This sensor is used to see and set the charge target for your future intelligent
144144

145145
You can use the [data_last_retrieved sensor](./diagnostics.md#intelligent-settings-data-last-retrieved) to determine when the underlying data was last retrieved from the OE servers.
146146

147-
### Target Time (Select)
147+
## Target Time (Select)
148148

149149
`select.octopus_energy_{{DEVICE_ID}}_intelligent_target_time`
150150

@@ -166,7 +166,7 @@ This is limited to 30 minute increments between 4 and 11 to match the Octopus En
166166
|-----------|------|-------------|
167167
| `raw_value` | `time` | The raw target time. This is useful if the time is set to a value outside of the range available in the select options (e.g. from another integration) |
168168

169-
### Target Time (Time)
169+
## Target Time (Time)
170170

171171
`time.octopus_energy_{{DEVICE_ID}}_intelligent_target_time`
172172

@@ -192,11 +192,11 @@ This gives you finer control over the times (still within valid time periods), b
192192
If you're moving to this integration from [megakid/ha_octopus_intelligent](https://github.com/megakid/ha_octopus_intelligent), below is a quick guide on what entities you should use
193193

194194
* `binary_sensor.octopus_intelligent_slot` - Use the [off peak sensor](./electricity.md#off-peak)
195-
* `binary_sensor.octopus_intelligent_planned_dispatch_slot` - There is no alternative for this.
195+
* `binary_sensor.octopus_intelligent_planned_dispatch_slot` - Use the [is dispatching sensor](#is-dispatching)
196196
* `binary_sensor.octopus_intelligent_slot_next_1_hour`, `binary_sensor.octopus_intelligent_slot_next_2_hours` and `binary_sensor.octopus_intelligent_slot_next_3_hours` - These sensors felt like they would always fall short of peoples requirements as everyone has different time periods they wish to know about. The [off peak sensor](./electricity.md#off-peak) exposes the current and next start/end times which could be used in a template sensor to determine how long the rate is cheap for when on. Or the [target rate](../setup/target_rate.md) or [rolling target rate](../setup/rolling_target_rate.md) might help for what you need.
197197
* `sensor.octopus_intelligent_next_offpeak_start` - The default off peak start date/time can be found as an attribute on the [off peak sensor](./electricity.md#off-peak). This can be extracted using a [template sensor](https://www.home-assistant.io/integrations/template/).
198198
* `sensor.octopus_intelligent_offpeak_end` - The default off peak end date/time can be found as an attribute on the [off peak sensor](./electricity.md#off-peak). This can be extracted using a [template sensor](https://www.home-assistant.io/integrations/template/).
199199
* `switch.octopus_intelligent_bump_charge` - Use the [bump charge sensor](#bump-charge)
200200
* `switch.octopus_intelligent_smart_charging` - Use the [smart charge sensor](#smart-charge)
201201
* `select.octopus_intelligent_target_time` - Use the [target time (time) sensor](#target-time-time) or [target time (select) sensor](#target-time-select)
202-
* `select.octopus_intelligent_target_soc` - Use the [charge target sensor](#charge-target)
202+
* `select.octopus_intelligent_target_soc` - Use the [charge target sensor](#charge-target)

_docs/entities/octoplus.md

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,37 @@ Binary sensor to indicate if a saving session that the account has joined is act
4343

4444
`calendar.octopus_energy_{{ACCOUNT_ID}}_octoplus_saving_sessions`
4545

46-
Calendar sensor to record saving sessions. Will be `on` when a saving session that the account has joined is active. Standard calendar attributes will indicate the current/next saving session.
46+
Read only [calendar](https://www.home-assistant.io/integrations/calendar) sensor to record saving sessions. Will be `on` when a saving session that the account has joined is active. Calendar events will be automatically added/removed by the integration when joined events are discovered.
47+
48+
Standard calendar attributes will indicate the current/next saving session.
49+
50+
!!! warning
51+
52+
The sensor does not store past events indefinitely. Past events could be removed without notice.
4753

4854
!!! info
4955

5056
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.
5157

52-
!!! note
53-
54-
The events are supplied by OE API and does not store past events indefinitely. Past events could be removed without notice.
58+
### Automation Example
59+
60+
Below is an example of raising a persistent notification 5 minutes before a saving session starts.
61+
62+
```yaml
63+
triggers:
64+
- trigger: calendar
65+
entity_id: calendar.octopus_energy_{{ACCOUNT_ID}}_octoplus_saving_sessions
66+
event: start
67+
offset: -00:05:00
68+
actions:
69+
- action: persistent_notification.create
70+
data:
71+
title: Saving Session Starting
72+
message: >
73+
{% 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 %}
74+
{% set start_time = (state_attr(trigger.entity_id, 'start_time') | as_datetime).strftime('%H:%M') %}
75+
Saving session starts at {{ start_time }} for {{ minutes }} minutes.
76+
```
5577
5678
## Saving Session Events
5779
@@ -170,7 +192,13 @@ Binary sensor to indicate if a free electricity session is active.
170192

171193
`calendar.octopus_energy_{{ACCOUNT_ID}}_octoplus_free_electricity_session`
172194

173-
Calendar sensor to record free electricity sessions. Will be `on` when a free electricity session is active. Standard calendar attributes will indicate the current/next saving session.
195+
Read only [calendar](https://www.home-assistant.io/integrations/calendar) sensor to record free electricity sessions. Will be `on` when a free electricity session is active. Calendar events will be automatically added/removed by the integration when events are discovered.
196+
197+
Standard calendar attributes will indicate the current/next saving session.
198+
199+
!!! warning
200+
201+
The sensor does not store past events indefinitely. Past events could be removed without notice.
174202

175203
!!! note
176204
This will only be available if you have enrolled into Octoplus. Once enrolled, reload the integration to gain access to this sensor. This is only applicable if you have signed up to [free electricity sessions](https://octopus.energy/free-electricity/). This sensor uses public information supplied by https://github.com/BottlecapDave/OctopusEnergyApi.
@@ -182,6 +210,26 @@ Calendar sensor to record free electricity sessions. Will be `on` when a free el
182210

183211
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.
184212

213+
### Automation Example
214+
215+
Below is an example of raising a persistent notification 5 minutes before a free electricity session starts.
216+
217+
```yaml
218+
triggers:
219+
- trigger: calendar
220+
entity_id: calendar.octopus_energy_{{ACCOUNT_ID}}_octoplus_free_electricity_session
221+
event: start
222+
offset: -00:05:00
223+
actions:
224+
- action: persistent_notification.create
225+
data:
226+
title: Free Electricity Session Starting
227+
message: >
228+
{% 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 %}
229+
{% set start_time = (state_attr(trigger.entity_id, 'start_time') | as_datetime).strftime('%H:%M') %}
230+
Free electricity session starts at {{ start_time }} for {{ minutes }} minutes.
231+
```
232+
185233
## Free Electricity Session Events
186234

187235
`event.octopus_energy_{{ACCOUNT_ID}}_octoplus_free_electricity_session_events`

custom_components/octopus_energy/electricity/current_rate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ def name(self):
7171
@property
7272
def state_class(self):
7373
"""The state class of sensor"""
74-
return SensorStateClass.MEASUREMENT
74+
return SensorStateClass.TOTAL
75+
76+
@property
77+
def device_class(self):
78+
"""The type of sensor"""
79+
return SensorDeviceClass.MONETARY
7580

7681
@property
7782
def icon(self):

custom_components/octopus_energy/electricity/next_rate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ def name(self):
5858
@property
5959
def state_class(self):
6060
"""The state class of sensor"""
61-
return SensorStateClass.MEASUREMENT
61+
return SensorStateClass.TOTAL
62+
63+
@property
64+
def device_class(self):
65+
"""The type of sensor"""
66+
return SensorDeviceClass.MONETARY
6267

6368
@property
6469
def icon(self):

custom_components/octopus_energy/electricity/previous_rate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ def name(self):
5858
@property
5959
def state_class(self):
6060
"""The state class of sensor"""
61-
return SensorStateClass.MEASUREMENT
61+
return SensorStateClass.TOTAL
62+
63+
@property
64+
def device_class(self):
65+
"""The type of sensor"""
66+
return SensorDeviceClass.MONETARY
6267

6368
@property
6469
def icon(self):

custom_components/octopus_energy/gas/current_rate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ def name(self):
6060
@property
6161
def state_class(self):
6262
"""The state class of sensor"""
63-
return SensorStateClass.MEASUREMENT
63+
return SensorStateClass.TOTAL
64+
65+
@property
66+
def device_class(self):
67+
"""The type of sensor"""
68+
return SensorDeviceClass.MONETARY
6469

6570
@property
6671
def icon(self):

custom_components/octopus_energy/gas/next_rate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ def name(self):
5656
@property
5757
def state_class(self):
5858
"""The state class of sensor"""
59-
return SensorStateClass.MEASUREMENT
59+
return SensorStateClass.TOTAL
60+
61+
@property
62+
def device_class(self):
63+
"""The type of sensor"""
64+
return SensorDeviceClass.MONETARY
6065

6166
@property
6267
def icon(self):

custom_components/octopus_energy/gas/previous_rate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ def name(self):
5656
@property
5757
def state_class(self):
5858
"""The state class of sensor"""
59-
return SensorStateClass.MEASUREMENT
59+
return SensorStateClass.TOTAL
60+
61+
@property
62+
def device_class(self):
63+
"""The type of sensor"""
64+
return SensorDeviceClass.MONETARY
6065

6166
@property
6267
def icon(self):

0 commit comments

Comments
 (0)