node-red-contrib-octopus-intelligent 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +129 -19
  2. package/README.md +386 -156
  3. package/examples/basic-monitoring.json +1 -1
  4. package/examples/boost-on-cheap-or-surplus.json +171 -0
  5. package/examples/charging-and-error-alerts.json +95 -0
  6. package/examples/cheapest-window-planner.json +165 -0
  7. package/examples/daily-charging-summary.json +165 -0
  8. package/examples/ha-dashboard.yaml +67 -2
  9. package/examples/mqtt-integration.json +1 -1
  10. package/examples/node-red-dashboard-flow.json +92 -2
  11. package/examples/set-preferences.json +1 -1
  12. package/lib/active-now.js +33 -0
  13. package/lib/auth.js +6 -1
  14. package/lib/boost.js +85 -0
  15. package/lib/categories/account.js +3 -3
  16. package/lib/categories/applicable-rates.js +29 -19
  17. package/lib/categories/completed-dispatches.js +2 -1
  18. package/lib/categories/electricity.js +23 -13
  19. package/lib/categories/flex-planned-dispatches.js +2 -2
  20. package/lib/categories/free-electricity.js +13 -1
  21. package/lib/categories/gas.js +13 -6
  22. package/lib/categories/home-mini.js +11 -3
  23. package/lib/categories/intelligent.js +87 -21
  24. package/lib/categories/octoplus.js +6 -3
  25. package/lib/categories/saving-sessions.js +15 -1
  26. package/lib/categories/smartflex-inverter.js +95 -0
  27. package/lib/categories/smartflex-vehicle.js +198 -0
  28. package/lib/categories/wheel-of-fortune.js +3 -2
  29. package/lib/commands.js +25 -3
  30. package/lib/discovery-retry.js +4 -1
  31. package/lib/discovery.js +71 -9
  32. package/lib/graphql-errors.js +160 -4
  33. package/lib/graphql.js +104 -7
  34. package/lib/http-get-json.js +64 -6
  35. package/lib/payload.js +15 -0
  36. package/lib/poll-retry.js +71 -0
  37. package/lib/poll-tick.js +88 -20
  38. package/lib/preferences.js +4 -2
  39. package/lib/scheduler.js +46 -8
  40. package/lib/sensor-definitions.js +51 -1
  41. package/lib/timezone.js +19 -1
  42. package/lib/values.js +47 -0
  43. package/octopus-intelligent.html +74 -34
  44. package/octopus-intelligent.js +1379 -250
  45. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Node-RED integration for **Octopus Energy** with automatic Home Assistant MQTT discovery
4
4
 
5
- Monitor electricity and gas rates (import + export), EV charging schedules, real-time home energy usage, account balance, saving sessions, and Wheel of Fortune spins — all automatically configured as Home Assistant entities via MQTT discovery.
5
+ Monitor electricity and gas rates (import + export), EV charging schedules, real-time home energy usage, account balance, saving sessions, and Wheel of Fortune spins. MQTT discovery sets them all up as Home Assistant entities.
6
6
 
7
7
  [![npm version](https://badge.fury.io/js/node-red-contrib-octopus-intelligent.svg)](https://www.npmjs.com/package/node-red-contrib-octopus-intelligent)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -51,9 +51,9 @@ If this project has helped you!
51
51
  ### 🎮 EV Smart Controls
52
52
  - **Target Charge Slider** (5–100%) — Set your desired battery level
53
53
  - **Ready Time Dropdown** (any half-hour slot, 00:00–23:30) — When your car needs to be ready. Matches the Octopus app; other values are rejected with an error and nothing is sent to Octopus.
54
- - **Apply Changes Button** — Prevents API spam while adjusting settings
54
+ - **Apply Changes Button** — In Home Assistant, press Apply Changes to send the new target and ready time. A command from a flow is sent at once.
55
55
  - **Confirmed Values** — See your current API-validated settings
56
- - **Smart Charging Toggle** — Suspend or resume Octopus intelligent charging from Node-RED or Home Assistant
56
+ - **Smart Charging Toggle** — Suspend or resume Octopus intelligent charging from Node-RED or Home Assistant. Each charging poll reads the current state, so a change made in the Octopus app shows up too.
57
57
 
58
58
  ### ⚡ Real-Time Charging Data
59
59
  - **Next Charge Time** — When your next slot starts
@@ -92,21 +92,27 @@ If this project has helped you!
92
92
  - **Wheel of Fortune** — Remaining electricity and gas spins (opt-in)
93
93
  - **Octoplus** — Enrollment status and loyalty points
94
94
 
95
+ ### 🚗 SmartFlex Vehicle and Inverter
96
+ - **Vehicle Details**: Make, model, battery size, charger power, and what Octopus says the device is doing
97
+ - **Charging Sessions**: Your last 5 sessions, with energy added, final charge, cost, and any problems
98
+ - **Boost Charge**: Start or cancel a boost with `set_boost`
99
+ - **Inverter Data (experimental)**: Solar, home battery, grid, and site power. Off by default.
100
+
95
101
  ### 🔧 Advanced Features
96
102
  - **Account Discovery** — Automatic product detection at startup; categories auto-enable based on registered products
97
- - **Per-Category Polling** — Each data category polls on its own configurable interval
103
+ - **Per-Category Polling** — Each data group polls on its own schedule. You set some intervals in the editor, and the rest are fixed.
98
104
  - **Manual Refresh Button** — Force API refresh from Home Assistant (30s cooldown)
99
- - **Next Poll Timer** — See when the next automatic refresh will occur
105
+ - **Next Poll Timer** — An estimate of the next automatic refresh
100
106
  - **API Usage Tracking** — Monitor requests and complexity in diagnostics
101
107
  - **Exponential Backoff** — Smart retry prevents sensor unavailability
102
- - **Comprehensive Debugging** — Full API call tracking in msg.debug
108
+ - **Error Fields and Status** — Each data group has its own `*_error` field in `msg.payload`. The node status and the Node-RED log show the rest.
103
109
 
104
110
  ### 🏡 Home Assistant Integration
105
111
  - **Zero Configuration** — MQTT auto-discovery sets everything up
106
112
  - **Two-Tier Entity Organisation** — Main entities (controls, live rates, consumption, tariff metadata, rewards) and Diagnostics (errors, raw timestamps, API metrics, locale timestamps)
107
113
  - **Suggested Area** — Auto-suggests "Energy" area
108
- - **Reference dashboard YAML** — `examples/ha-dashboard.yaml` covers every entity (including the Smart Charging and Charge Cap switches) in a packed sections layout, ready to paste into HA's Raw Configuration Editor
109
- - **Node-RED Dashboard 2.0 example** — `examples/node-red-dashboard-flow.json` is an importable [@flowfuse/node-red-dashboard](https://github.com/FlowFuse/node-red-dashboard) flow whose Controls page has the target limit, all 48 ready-by times, the Smart Charging and Charge Cap switches, refresh and timezone override
114
+ - **Reference dashboard YAML** — `examples/ha-dashboard.yaml` covers all controls (including the Smart Charging, Charge Cap, and Boost Charge switches), live values, SmartFlex vehicle cards, and the error state binary sensors in a packed sections layout, ready to paste into HA's Raw Configuration Editor. A few diagnostic sensors and the experimental inverter entities are left out.
115
+ - **Node-RED Dashboard 2.0 example** — `examples/node-red-dashboard-flow.json` is an importable [@flowfuse/node-red-dashboard](https://github.com/FlowFuse/node-red-dashboard) flow whose Controls page has the target limit, all 48 ready-by times, the Smart Charging, Charge Cap, and Boost Charge switches, refresh, and the timezone override. Its Status page shows the SmartFlex vehicle and recent charging sessions.
110
116
 
111
117
  ### 🌍 Timezone Support
112
118
  - **Locale Timestamps** (`*_locale` fields) — always in server auto-detected timezone
@@ -123,7 +129,7 @@ If this project has helped you!
123
129
 
124
130
  ![Node Configuration](images/examples/Octopus%20Intelligent%20Node.png)
125
131
 
126
- Configure your account credentials, polling intervals, and MQTT broker in the node editor. The MQTT Broker dropdown connects directly to your Home Assistant Mosquitto instance. Per-category intervals let you tune how often each data source is polled — electricity and gas rates update hourly by default, while Home Mini polls every minute for live demand.
132
+ Configure your account credentials, polling intervals, and MQTT broker in the node editor. The MQTT Broker dropdown connects directly to your Home Assistant Mosquitto instance. Per-category intervals set how often the node polls each data source. Electricity and gas rates update hourly by default, while Home Mini polls every minute for live demand.
127
133
 
128
134
  ### Node-RED Flow Example
129
135
 
@@ -131,7 +137,7 @@ Configure your account credentials, polling intervals, and MQTT broker in the no
131
137
 
132
138
  ### Home Assistant — Dashboard
133
139
 
134
- `examples/ha-dashboard.yaml` is a comprehensive Lovelace dashboard that exposes every entity the plugin publishes. Paste it into HA's Raw Configuration Editor to get the layout below. The layout uses HA's sections view and packs cards uniformly across up to 4 columns on wide screens. The EV controls card includes the Smart Charging and Charge Cap switches (the screenshots below predate the Charge Cap switch).
140
+ `examples/ha-dashboard.yaml` is a Lovelace dashboard with all controls, live values, and error state binary sensors. A few diagnostic sensors and the experimental inverter entities are left out. Paste it into HA's Raw Configuration Editor to get the layout below. The layout uses HA's sections view and packs cards uniformly across up to 4 columns on wide screens. The EV controls card includes the Smart Charging, Charge Cap, and Boost Charge switches. The SmartFlex vehicle cards hide on accounts without a SmartFlex car or charge point. The screenshots below predate the Charge Cap and Boost Charge switches.
135
141
 
136
142
  #### EV controls, electricity import & export
137
143
 
@@ -155,7 +161,7 @@ UTC-class slot/window timestamps (HA renders them as relative "n hours ago"), ra
155
161
 
156
162
  ![Dashboard — gas live data](images/examples/home_assistant_dashboard_working_gas_1-3-0.png)
157
163
 
158
- For accounts with a gas meter point, the gas card populates with live tariff code, unit rate (p/kWh), standing charge, daily consumption (kWh), and tariff validity dates. Above shows v1.3.0 reading correctly from a real account on Octopus standard variable gas tariff.
164
+ For accounts with a gas meter point, the gas card shows the live tariff code, unit rate (p/kWh), standing charge, daily consumption (kWh), and tariff validity dates. The screenshot shows v1.3.0 reading a real account on the Octopus standard variable gas tariff.
159
165
 
160
166
  #### Seasonal / conditional entities — when they show "Unavailable"
161
167
 
@@ -165,11 +171,11 @@ For accounts with a gas meter point, the gas card populates with live tariff cod
165
171
  | Free Electricity Start / End | typically June–October | `null` — no sessions scheduled |
166
172
  | Electricity / Gas Tariff Valid To | When tariff has an end date | `null` — open-ended tariff |
167
173
  | Gas entities | Only if account has a gas meter point | `null` — electricity-only accounts |
168
- | Home Mini | Only if a Home Mini device is registered | Entity skipped if not registered |
174
+ | Home Mini | Only if a Home Mini device is registered | Entities are still created and stay empty |
169
175
  | Electricity Export entities | Only if account has an OUTGOING agreement | Entity values null without an export tariff |
170
176
  | EV planned slots / dispatches | Only when a charge is scheduled | `null` between plug-in cycles |
171
177
 
172
- These are normal MQTT behaviours, not bugs. The plugin publishes the entity definitions so HA registers them; their values populate when the API returns data for that period.
178
+ This is normal. The node publishes the entity definitions so HA registers them, and the values fill in when the API returns data for that period.
173
179
 
174
180
  ---
175
181
 
@@ -209,11 +215,13 @@ These are normal MQTT behaviours, not bugs. The plugin publishes the entity defi
209
215
  2. Double-click to configure:
210
216
  - Account Number (format: `A-XXXXXXXX`)
211
217
  - API Key (stored securely)
212
- - Refresh Interval (default: 5 min — controls EV charging data polling)
213
- - Per-category polling intervals (electricity, gas, etc.)
214
- - ☑ Enable Home Mini — tick if you have an Octopus Home Mini device
215
- - ☑ Enable Wheel of Fortune — tick to track remaining spins
216
- - Enable MQTT if using Home Assistant and select your MQTT broker
218
+ - Intelligent (Min) sets the charging data poll interval. The default is 5 minutes.
219
+ - Intervals for electricity, gas, Wheel of Fortune, and Home Mini (all optional)
220
+ - Untick Electricity to stop the electricity rates and consumption polls. The node still polls applicable rates and free electricity while your account has an electricity meter.
221
+ - ☑ Enable Home Mini: tick if you have an Octopus Home Mini device
222
+ - ☑ Enable Wheel of Fortune: tick to track remaining spins
223
+ - ☐ Inverter (experimental): tick only if Octopus controls your solar inverter. Off by default.
224
+ - Tick Enable Home Assistant MQTT and choose a broker to publish to Home Assistant
217
225
  3. **Deploy** — account discovery runs automatically and enables categories based on your registered products
218
226
 
219
227
  ### 4. Home Assistant (Optional)
@@ -222,20 +230,29 @@ If MQTT enabled:
222
230
  1. Wait ~5 seconds after deploy
223
231
  2. **Settings** → **Devices & Services** → **MQTT**
224
232
  3. Find "Octopus Intelligent" device
225
- 4. All entities created automatically — no YAML required
233
+ 4. The entities are already there. No YAML is needed.
226
234
 
227
235
  ---
228
236
 
237
+ ## ⬆️ Upgrading to v1.7.0
238
+
239
+ v1.7.0 adds features. Existing flows, automations, and dashboards keep working, with one change for MQTT commands.
240
+
241
+ - The node now ignores retained messages on `submit_changes`, `refresh`, `set_smart_charging`, `set_charge_cap`, and `set_boost`, and logs one warning per topic. Home Assistant does not retain these commands, so its buttons and switches work as before. If your own flow publishes one of these commands with retain set, turn retain off. To clear an old retained message, publish an empty retained message to that topic.
242
+ - With a SmartFlex car or charge point, 11 new entities appear in Home Assistant: the Boost Charge switch and 10 vehicle entities. Octopus lists a charge point as an electric vehicle, so it gets the same entities. See Home Assistant Entities below for the counts.
243
+ - The experimental Inverter option is off, so nothing changes for inverters until you tick it.
244
+ - If you go back to an older version, the new entities stay in Home Assistant. The vehicle entities show Unavailable, and the Boost Charge switch keeps its last state and does nothing. The broker still holds their retained discovery config, so Home Assistant will not delete them one by one. To remove them, clear their retained discovery topics on the broker (`homeassistant/.../nodered_<account>_<id>/config`), for example with MQTT Explorer. Or delete the Octopus Intelligent device in Home Assistant: that clears the topics, but you lose the names and areas you set and any entity ids you changed. If you ticked Inverter, untick it and deploy before you go back, and the node removes the inverter entities for you.
245
+
229
246
  ## ⬆️ Upgrading from v1.2.x
230
247
 
231
- v1.3.0 is additive — no breaking changes. Existing flows, automations, and dashboards continue working unchanged.
248
+ v1.3.0 only adds features and has no breaking changes. Existing flows, automations, and dashboards keep working.
232
249
 
233
250
  **What happens on upgrade:**
234
251
  - All existing entity IDs are preserved (HA's MQTT integration matches by `unique_id`, which is stable)
235
252
  - All v1.2.x payload fields remain in the same positions
236
- - ~70 new sensors appear in Home Assistant automatically after first poll — electricity import/export tariff and rates, gas tariff and consumption, Home Mini, Octoplus, saving sessions, free electricity, Wheel of Fortune, account balance, applicable rates
253
+ - About 70 new sensors appear in Home Assistant after the first poll. They cover electricity import and export tariffs and rates, gas tariff and consumption, Home Mini, Octoplus, saving sessions, free electricity, Wheel of Fortune, account balance, and applicable rates.
237
254
  - New node config options (Home Mini, Wheel of Fortune) default to off
238
- - Two existing Octoplus booleans (`octoplus_enrolled`, `octoplus_loyalty_points_user`) move from `sensor.` to `binary_sensor.` domain — a fresh install picks the right domain automatically; a clean upgrade may register both. Delete the old `sensor.` entries via Dev Tools if you want a tidy device card.
255
+ - Two existing Octoplus booleans (`octoplus_enrolled`, `octoplus_loyalty_points_user`) move from the `sensor.` to the `binary_sensor.` domain. A fresh install picks the right domain, but an upgrade may register both. Delete the old `sensor.` entries in Dev Tools if you want a tidy device card.
239
256
 
240
257
  If you installed an early dev build of v1.3 and have stale entities in Home Assistant, see [Stale Entities After Early v1.3 Dev Build](#stale-entities-after-early-v13-dev-build) in the Troubleshooting section.
241
258
 
@@ -243,29 +260,26 @@ If you installed an early dev build of v1.3 and have stale entities in Home Assi
243
260
 
244
261
  ## 📊 Home Assistant Entities
245
262
 
246
- **164 MQTT entities** are published under a single **Octopus Intelligent** device on a fresh install. All entities are organised into two tiers: **Main** (controls, live data, tariff metadata, rewards) and **Diagnostics** (errors, raw timestamps, locale timestamps, API metrics).
263
+ **175 MQTT entities** are published under a single **Octopus Intelligent** device on a fresh install with a car or charge point Octopus smart-charges. Without one, the 10 vehicle entities and the Boost Charge switch are left out and the count is **164**. If you tick the experimental **Inverter** option and Octopus lists an inverter on your account, 14 more are added (**189** with a car). All entities are organised into two tiers: **Main** (controls, live data, tariff metadata, rewards) and **Diagnostics** (errors, raw timestamps, locale timestamps, API metrics).
247
264
 
248
- If your device card shows more than 164 entities, the extras are likely leftovers from earlier installed versions or interrupted discovery. They can be deleted via Settings → Devices & Services → MQTT → Octopus Intelligent → entity → cog → "Delete from registry" without affecting current operation.
265
+ If your device card shows more entities than these counts, the extras are likely leftovers from earlier installed versions or interrupted discovery. They can be deleted via Settings → Devices & Services → MQTT → Octopus Intelligent → entity → cog → "Delete from registry" without affecting current operation.
249
266
 
250
267
  ### Node-RED payload vs MQTT entities
251
268
 
252
- `msg.payload` from the Node-RED node contains **~133 fields**. Some payload fields are intentionally **not** exposed as individual HA entities; they exist for template/automation use inside Node-RED or HA Jinja:
269
+ `msg.payload` from the Node-RED node contains more than 150 fields. Some payload fields are intentionally **not** exposed as individual HA entities; they exist for template/automation use inside Node-RED or HA Jinja:
253
270
 
254
271
  | Category | Fields (count) | Why no MQTT entity |
255
272
  |---|---|---|
256
273
  | Bulk array data | `applicable_rates`, `electricity_export_rate`, `completed_dispatches`, `flex_planned_dispatches` (4) | Each is an array of 48 half-hour slots or N dispatches. Exposing each row as an MQTT entity would clutter the registry. The `_count` summary entity exists; consume the full array via templates / `apexcharts-card` for visualisation. |
257
274
  | Pending controls | `pending_limit`, `pending_time` (2) | The number/select control entities (`Target Charge`, `Ready By`) render the pending value through their own `value_template`. No separate sensor entity needed. |
258
- | Import rate adjacency | `applicable_rates_prev_pence`, `_prev_gbp`, `_prev_to`, `_next_pence`, `_next_gbp`, `_next_from` (6) | Available in `msg.payload` for templates / dashboards. Export equivalents (`electricity_export_rate_prev_*` / `_next_*`) ARE exposed as MQTT entities — the inconsistency is intentional pending v1.4 promotion. |
259
- | Cost placeholders | `electricity_consumption_cost`, `gas_consumption_cost` (2) | Reserved for future cost-calculation feature (consumption × rate). Always `null` in v1.3. |
260
- | Vestigial | `saving_session_points` (1) | Octopus moved loyalty points out of saving sessions into the Octoplus query. The payload field remains for backward compatibility but is always `null`; use `binary_sensor.octopus_intelligent_octopus_octoplus_loyalty_points` instead. |
275
+ | Cost placeholders | `electricity_consumption_cost`, `gas_consumption_cost` (2) | Reserved for a future cost calculation (consumption × rate). Always `null`. |
276
+ | Vestigial | `saving_session_points` (1) | Octopus moved points to the Octoplus query. The field is always `null`. A sensor named Octopus Octopus Points still exists and is always empty. Use `octoplus_loyalty_points_user` for Octoplus. |
261
277
 
262
- **Implication for HA users:** every value you might want to display is reachable. Direct values use the MQTT entity. Adjacent-slot import rates require an MQTT template sensor reading from `applicable_rates_prev_pence` etc. (or use the Node-RED debug node to inspect the full payload).
263
-
264
- **Why the import / export asymmetry?** Phase 2 of v1.3.0 added the full export rate ecosystem as new MQTT entities. The pre-existing import prev/next fields were added in v1.0 as payload-only and weren't promoted at the time. Promoting them is straightforward but was descoped from v1.3 to keep release scope tight; tracked for v1.4.
278
+ **Implication for HA users.** Every value you might want to show is reachable. Direct values use the MQTT entity. Previous and next import rates are available as diagnostic sensors.
265
279
 
266
280
  ### Controls
267
281
 
268
- Interactive entities that accept commands. **Timezone**, **Smart Charging** and **Charge Cap** still carry the HA `entity_category: config` flag (they ARE user-configurable, so the category is semantically correct).
282
+ These entities take commands. **Timezone**, **Smart Charging**, and **Charge Cap** carry the HA `entity_category: config` flag, because they are settings you change.
269
283
 
270
284
  | Name | Description |
271
285
  |---|---|
@@ -273,20 +287,25 @@ Interactive entities that accept commands. **Timezone**, **Smart Charging** and
273
287
  | Octopus Ready Time | Dropdown (00:00–23:30, half-hour slots) — time by which the car must be ready. Other values are rejected with an error and nothing is sent to Octopus |
274
288
  | Octopus Apply Changes | Submit pending limit/time changes to the Octopus API |
275
289
  | Octopus Refresh API | Force an immediate API refresh (30-second cooldown enforced) |
276
- | Timezone | Display timezone for all slot and window times — 15 IANA options; persists across Node-RED restarts |
290
+ | Timezone | Display timezone for all slot and window times, with 15 IANA options |
277
291
  | Smart Charging | Enable (unsuspend) or disable (suspend) Octopus intelligent charging |
278
292
  | Charge Cap | Limit smart charging to off-peak rates only (as in the Octopus app) |
293
+ | Boost Charge | Start charging now, outside the Octopus plan. Turn off to cancel the boost. Only published when Octopus lists a car or charger it controls |
279
294
 
280
295
  ### Binary Sensors
281
296
 
282
297
  | Name | Description |
283
298
  |---|---|
284
- | Octopus Charging Now | `ON` while the EV is actively inside a dispatch charging slot |
299
+ | Octopus Charging Now | `ON` while the EV is inside a dispatch charging slot or a boost is running |
285
300
  | Octopus Saving Session Available | `ON` if a saving session is upcoming or joinable |
286
301
  | Octopus Free Electricity Active | `ON` while a free electricity window is in progress right now |
287
302
  | Octopus Free Electricity Available | `ON` if a free electricity window is scheduled in the future |
288
303
  | Octopus Octoplus Enrolled | `ON` if the account is enrolled in Octoplus |
289
304
  | Octopus Octoplus Loyalty Points | `ON` if the account participates in Octoplus loyalty points (boolean flag from the API) |
305
+ | Octopus Saving Session Joined | On when you have joined the current saving session campaign |
306
+ | Octopus Saving Session Window Active | On while a saving session window is open, joined or not |
307
+ | Octopus Saving Session Active | On while a saving session window is open and you have joined |
308
+ | Octopus Last Charge Session Problem | `ON` if the latest finished charging session had a problem. Only with a SmartFlex car or charge point |
290
309
 
291
310
  ### Main Sensors — EV Charging
292
311
 
@@ -309,6 +328,15 @@ Interactive entities that accept commands. **Timezone**, **Smart Charging** and
309
328
  | Octopus Completed Dispatches | Count of completed intelligent dispatch sessions on record |
310
329
  | Octopus Flex Planned Dispatches | Count of upcoming flex dispatch slots |
311
330
 
331
+ ### Main Sensors, SmartFlex Vehicle
332
+
333
+ Only published when Octopus lists a SmartFlex car or charge point on your account.
334
+
335
+ | Name | Description |
336
+ |---|---|
337
+ | Octopus Last Charge Session Energy | kWh added in the latest finished charging session. The last 5 sessions and the device alerts are attributes. Each new session starts a new total, so Home Assistant keeps statistics and you can add it to the Energy dashboard as an individual device |
338
+ | Octopus Last Charge Session Final Charge | Battery percentage at the end of the latest finished session |
339
+
312
340
  ### Main Sensors — Electricity (Import)
313
341
 
314
342
  | Name | Description |
@@ -320,6 +348,10 @@ Interactive entities that accept commands. **Timezone**, **Smart Charging** and
320
348
  | Octopus Electricity Unit Rate | Fixed unit rate (p/kWh) — `null` on half-hourly tariffs |
321
349
  | Octopus Electricity Tariff Code | Current import tariff product code |
322
350
  | Octopus Electricity Tariff Valid From / Valid To | Validity window of the current import tariff (`Valid To` is `null` for open-ended tariffs) |
351
+ | Octopus Electricity Day Rate | Day rate in p/kWh on tariffs with rate bands |
352
+ | Octopus Electricity Night Rate | Night rate in p/kWh on tariffs with rate bands |
353
+ | Octopus Electricity EV Peak Rate | EV peak rate in p/kWh on four-rate EV tariffs |
354
+ | Octopus Electricity EV Off-Peak Rate | EV off-peak rate in p/kWh on four-rate EV tariffs |
323
355
 
324
356
  ### Main Sensors — Electricity (Export)
325
357
 
@@ -348,7 +380,6 @@ Interactive entities that accept commands. **Timezone**, **Smart Charging** and
348
380
  | Name | Description |
349
381
  |---|---|
350
382
  | Octopus Account Balance | Current account credit or debit balance (£) |
351
- | Octopus Saving Session Joined | Whether you have joined the current saving session campaign |
352
383
  | Octopus WoF Electricity Spins | Wheel of Fortune electricity spins remaining (opt-in) |
353
384
  | Octopus WoF Gas Spins | Wheel of Fortune gas spins remaining (opt-in) |
354
385
 
@@ -377,7 +408,7 @@ Appears under the **Diagnostics** tab of the HA device card.
377
408
 
378
409
  | Name | Description |
379
410
  |---|---|
380
- | Octopus Next Poll Time | Timestamp of the next scheduled automatic API refresh |
411
+ | Octopus Next Poll Time | Estimate of the next automatic API refresh |
381
412
  | Octopus Refresh Available At | Timestamp when the manual refresh cooldown expires (`null` = available now) |
382
413
 
383
414
  #### API Usage
@@ -444,6 +475,12 @@ Times in the Node-RED server's auto-detected timezone. Unlike display fields, th
444
475
  | Octopus Electricity Export Rate Prev Ends | Timestamp when the previous export slot ended |
445
476
  | Octopus Electricity Export Rate Next | Next half-hour export rate (p/kWh) |
446
477
  | Octopus Electricity Export Rate Next From | Timestamp when the next export slot begins |
478
+ | Octopus Applicable Rates Min / Max / Median / Avg | Lowest, highest, median, and average import rate in the next 24 hours (p/kWh) |
479
+ | Octopus Electricity Export Rate Min / Max / Median / Avg | The same four values for export (p/kWh) |
480
+ | Octopus Applicable Rate Prev / Next | Previous and next import rate (p/kWh) |
481
+ | Octopus Applicable Rate Prev (GBP) / Next (GBP) | Previous and next import rate in pounds per kWh |
482
+ | Octopus Applicable Rate Prev Ends / Next From | When the previous slot ends and the next slot starts |
483
+ | Octopus Electricity Export Rate Prev (GBP) / Next (GBP) | Previous and next export rate in pounds per kWh |
447
484
 
448
485
  #### Error & Detail Sensors
449
486
 
@@ -456,22 +493,173 @@ Times in the Node-RED server's auto-detected timezone. Unlike display fields, th
456
493
  | Octopus Gas Rates Error | Last error fetching gas rates |
457
494
  | Octopus Gas Consumption Error | Last error fetching gas consumption |
458
495
  | Octopus Applicable Rates Error | Last error fetching the import applicable rates schedule |
459
- | Octopus Electricity Export Rate Error | Last error fetching the export applicable rates schedule |
496
+ | Octopus Electricity Export Rate Error | Last error fetching the export applicable rates schedule. The same text is in `applicable_rates_export_error` in `msg.payload`. |
460
497
  | Octopus Account Balance (Pence) | Account balance in pence (raw integer) |
461
498
  | Octopus Account Error | Last error fetching account data |
462
499
  | Octopus Octoplus Error | Last error fetching Octoplus data |
463
- | Octopus WoF Electricity Max | Maximum Wheel of Fortune electricity spins allowed per period |
464
- | Octopus WoF Electricity Used | Wheel of Fortune electricity spins used this period |
465
- | Octopus WoF Gas Max | Maximum Wheel of Fortune gas spins allowed per period |
466
- | Octopus WoF Gas Used | Wheel of Fortune gas spins used this period |
500
+ | Octopus WoF Electricity Max | Always empty. Octopus no longer provides it. Use the Spins sensor. |
501
+ | Octopus WoF Electricity Used | Always empty. Octopus no longer provides it. Use the Spins sensor. |
502
+ | Octopus WoF Gas Max | Always empty. Octopus no longer provides it. Use the Spins sensor. |
503
+ | Octopus WoF Gas Used | Always empty. Octopus no longer provides it. Use the Spins sensor. |
467
504
  | Octopus WoF Error | Last error fetching Wheel of Fortune data |
468
505
  | Octopus Home Mini Reading Time | Timestamp of the most recent Home Mini telemetry reading |
469
506
  | Octopus Home Mini Error | Last error fetching Home Mini data |
470
507
  | Octopus Saving Sessions Error | Last error fetching saving sessions data |
471
508
  | Octopus Free Electricity Error | Last error fetching free electricity data |
472
509
  | Octopus Completed Dispatches Error | Last error fetching completed dispatch history |
473
- | Octopus Flex Planned Dispatches Error | Last error fetching flex planned dispatch schedule |
474
- | Octopus Intelligent Error | Last error from the intelligent charging (EV slots) query |
510
+ | Octopus Flex Planned Dispatches Error | Always empty today. Flex dispatch errors appear in Intelligent Error. |
511
+ | Octopus Intelligent Error | Last error from the intelligent charging (EV slots) query. A short text with the Octopus code, for example `KT-CT-4340: Unable to fetch planned dispatches`. |
512
+
513
+ The `... Error State` binary sensors (15, plus SmartFlex Vehicle Error State with a car or charge point and SmartFlex Inverter Error State with the Inverter option) turn on when the matching error field has a value. They turn off when it is empty.
514
+
515
+ #### SmartFlex Vehicle
516
+
517
+ Only published when Octopus lists a SmartFlex car or charge point on your account.
518
+
519
+ | Name | Description |
520
+ |---|---|
521
+ | Octopus Vehicle Make | Make of the car Octopus controls. For a charge point, this is the charger's make |
522
+ | Octopus Vehicle Model | Model of the car. For a charge point, this is the charger's model |
523
+ | Octopus Vehicle Battery Size | Battery size in kWh |
524
+ | Octopus Charger Power | Charger power output in kW |
525
+ | Octopus Vehicle Device State | What Octopus says the device is doing, for example `SMART_CONTROL_IN_PROGRESS` |
526
+ | Octopus SmartFlex Vehicle Error | Last error from the vehicle query. `null` means healthy |
527
+
528
+ #### Update
529
+
530
+ | Name | Description |
531
+ |---|---|
532
+ | Octopus Intelligent Node (Update entity) | Shows when a newer version of this node is on npm. It only tells you. Install from Node-RED Palette Manager. |
533
+ | Octopus Installed Version | Version of this node that is running |
534
+ | Octopus Latest Version | Newest version found on npm |
535
+ | Octopus Update Check At | When the node last checked for a new version |
536
+ | Octopus Update Check Error | Last error from the update check |
537
+
538
+ #### SmartFlex Inverter (experimental)
539
+
540
+ These entities exist only when the **Inverter** option is ticked and Octopus lists an inverter on your account. They are on the same device. Unticking the option removes them.
541
+
542
+ | Name | Description |
543
+ |---|---|
544
+ | Octopus Solar Power | Solar generation in kW |
545
+ | Octopus Home Battery Power | Home battery power in kW |
546
+ | Octopus Home Battery Charge | Home battery charge in % |
547
+ | Octopus Grid Power | Grid power in kW |
548
+ | Octopus Site Consumption | Site consumption in kW |
549
+ | Octopus Site Export | Site export in kW |
550
+ | Octopus Inverter Power | Inverter power in kW |
551
+ | Octopus Inverter Online | `ON` when Octopus reports the inverter as connected |
552
+ | Octopus Inverter Make / Model | Diagnostic. Inverter make and model |
553
+ | Octopus Solar Peak Power | Diagnostic. Peak solar power in kW |
554
+ | Octopus Inverter Connection Status | Diagnostic. Connection status text from Octopus |
555
+ | Octopus SmartFlex Inverter Error | Diagnostic. Last error from the inverter query |
556
+ | Octopus SmartFlex Inverter Error State | Diagnostic. `ON` when the error field has a value |
557
+
558
+ ---
559
+
560
+ ## 🚗 SmartFlex Vehicle Data
561
+
562
+ If Octopus controls your electric car or charge point, the node reads its details and recent charging sessions. This runs when the node discovers an EV or charge point on your account, and then every 30 minutes. If Octopus lists more than one, the node uses the one Octopus says is live, or the first if none is. You do not need to turn it on. If no device is found, the fields stay `null` or empty and Home Assistant gets no vehicle entities.
563
+
564
+ The fields land in `msg.payload`.
565
+
566
+ | Field | Type | Description |
567
+ |---|---|---|
568
+ | `vehicle_make` | string or null | Make of the car or charge point |
569
+ | `vehicle_model` | string or null | Model |
570
+ | `vehicle_battery_kwh` | number or null | Battery size in kWh |
571
+ | `charger_power_kw` | number or null | Charger power output in kW |
572
+ | `device_state` | string or null | What Octopus says the device is doing, for example `SMART_CONTROL_IN_PROGRESS`, `BOOSTING`, or `LOST_CONNECTION`. Read by the charging poll, so it updates every refresh interval and always agrees with `boosting` |
573
+ | `device_alerts` | array | Octopus alerts as `[{ message, published_at }]`, the 10 newest first. Each message is cut to 250 characters |
574
+ | `last_session` | object or null | The latest finished session |
575
+ | `charging_sessions` | array | Your last 5 sessions, newest first |
576
+ | `last_session_kwh` | number or null | kWh added in the latest finished session |
577
+ | `last_session_soc_final` | number or null | Final charge % of the latest finished session |
578
+ | `last_session_problem` | boolean or null | `true` if the latest finished session had a problem |
579
+ | `smartflex_vehicle_error` | string or null | The last error, or `null` |
580
+
581
+ Each session has `start`, `end`, `kwh_added`, `soc_change`, `soc_final`, `type`, `cost`, and `problems`. `cost` is `{ amount, currency }` or `null`. `problems` is a list of problem names.
582
+
583
+ ```json
584
+ {
585
+ "vehicle_make": "Tesla",
586
+ "vehicle_model": "Model 3",
587
+ "vehicle_battery_kwh": 75,
588
+ "charger_power_kw": 7.4,
589
+ "device_state": "SMART_CONTROL_IN_PROGRESS",
590
+ "device_alerts": [],
591
+ "last_session": {
592
+ "start": "2026-10-06T00:30:00Z",
593
+ "end": "2026-10-06T04:30:00Z",
594
+ "kwh_added": 24.1,
595
+ "soc_change": 32,
596
+ "soc_final": 80,
597
+ "type": "SMART",
598
+ "cost": { "amount": 1.81, "currency": "GBP" },
599
+ "problems": []
600
+ },
601
+ "charging_sessions": [],
602
+ "last_session_kwh": 24.1,
603
+ "last_session_soc_final": 80,
604
+ "last_session_problem": false,
605
+ "smartflex_vehicle_error": null
606
+ }
607
+ ```
608
+
609
+ `charging_sessions` holds up to 5 objects shaped like `last_session`. The example leaves it empty to stay short. If a poll fails, `smartflex_vehicle_error` holds a short error with the Octopus code, and the other fields keep their last values. If Octopus returns only part of the data, for example the sessions fail but the rest comes back, the node uses what came back, keeps the last values for the rest, sets `smartflex_vehicle_error`, and logs a warning.
610
+
611
+ Home Assistant gets these entities. If Octopus lists devices but none is a car or charge point, the node removes them. If Octopus lists no devices at all (this can happen for a moment), the node leaves them as they are. When Octopus sends no value, a number sensor shows unknown, and Vehicle Make, Vehicle Model and Vehicle Device State show Unavailable. If you go back to an older version, these entities stay in Home Assistant and show Unavailable, not a problem. To remove them, delete them in Home Assistant.
612
+
613
+ - Last Charge Session Energy and Last Charge Session Final Charge (main sensors)
614
+ - Last Charge Session Problem (binary sensor)
615
+ - Vehicle Make, Vehicle Model, Vehicle Battery Size, Charger Power, Vehicle Device State, and SmartFlex Vehicle Error (diagnostic sensors)
616
+ - SmartFlex Vehicle Error State (diagnostic binary sensor)
617
+
618
+ The session list and the alerts are attributes of the Last Charge Session Energy sensor. That sensor has state class `total`, and its last reset is the end of the session. So Home Assistant adds each finished session's kWh to its statistics once.
619
+
620
+ ## ☀️ SmartFlex Inverter Data (experimental)
621
+
622
+ > **Not yet verified on a real inverter.** The field names come from the Octopus schema, but no inverter was available to test with. If the values look wrong, please open an issue.
623
+
624
+ This is off by default. To turn it on, tick **Inverter** in the node settings and deploy. The node then reads inverter data every 5 minutes.
625
+
626
+ Octopus must list a SmartFlex inverter on your account. That means an inverter Octopus controls itself, for example through Intelligent Octopus Flux. Inverters from other brands, or inverters Octopus does not control, will not appear. If Octopus lists no inverter, the node reads nothing.
627
+
628
+ | Field | Type | Description |
629
+ |---|---|---|
630
+ | `inverter_make` | string or null | Inverter make |
631
+ | `inverter_model` | string or null | Inverter model |
632
+ | `solar_peak_kw` | number or null | Peak solar power in kW |
633
+ | `inverter_power_kw` | number or null | Inverter power in kW |
634
+ | `inverter_connection_status` | string or null | Connection status from Octopus |
635
+ | `inverter_online` | boolean or null | `true` when the status is `CONNECTED` or `ONLINE` |
636
+ | `home_battery_power_kw` | number or null | Home battery power in kW |
637
+ | `home_battery_soc` | number or null | Home battery charge in % |
638
+ | `solar_power_kw` | number or null | Solar generation in kW |
639
+ | `grid_power_kw` | number or null | Grid power in kW |
640
+ | `site_consumption_kw` | number or null | Site consumption in kW |
641
+ | `site_export_kw` | number or null | Site export in kW |
642
+ | `smartflex_inverter_error` | string or null | The last error, or `null` |
643
+
644
+ ```json
645
+ {
646
+ "inverter_make": "ExampleMake",
647
+ "inverter_model": "ExampleModel",
648
+ "solar_peak_kw": 4,
649
+ "inverter_power_kw": 2.1,
650
+ "inverter_connection_status": "CONNECTED",
651
+ "inverter_online": true,
652
+ "home_battery_power_kw": -1.2,
653
+ "home_battery_soc": 64,
654
+ "solar_power_kw": 3.3,
655
+ "grid_power_kw": 0.2,
656
+ "site_consumption_kw": 1.9,
657
+ "site_export_kw": 0,
658
+ "smartflex_inverter_error": null
659
+ }
660
+ ```
661
+
662
+ The values above are made up to show the shape. Home Assistant gets 14 extra entities, listed in the entity tables above. Unticking the option removes them.
475
663
 
476
664
  ---
477
665
 
@@ -480,8 +668,8 @@ Times in the Node-RED server's auto-detected timezone. Unlike display fields, th
480
668
  Octopus Energy runs free electricity sessions (typically June–October) and saving sessions (typically October–March). The node polls for both and exposes binary sensors for automation use.
481
669
 
482
670
  ### Free Electricity
483
- - **`binary_sensor.octopus_free_electricity_active`** — `ON` while a free window is in progress right now
484
- - **`binary_sensor.octopus_free_electricity_available`** — `ON` if an upcoming free window is scheduled
671
+ - **`binary_sensor.octopus_intelligent_octopus_free_electricity_active`** — `ON` while a free window is in progress right now
672
+ - **`binary_sensor.octopus_intelligent_octopus_free_electricity_available`** — `ON` if an upcoming free window is scheduled
485
673
 
486
674
  Use these to automatically start charging your car or battery when electricity is free:
487
675
 
@@ -490,7 +678,7 @@ automation:
490
678
  - alias: "Charge during free electricity"
491
679
  trigger:
492
680
  platform: state
493
- entity_id: binary_sensor.octopus_free_electricity_active
681
+ entity_id: binary_sensor.octopus_intelligent_octopus_free_electricity_active
494
682
  to: "on"
495
683
  action:
496
684
  service: switch.turn_on
@@ -499,21 +687,23 @@ automation:
499
687
  ```
500
688
 
501
689
  ### Saving Sessions
502
- - **`binary_sensor.octopus_saving_session_available`** — `ON` if a saving session is upcoming
503
- - **`sensor.octopus_saving_session_start`** / **`sensor.octopus_saving_session_end`** — start and end times
690
+ - **`binary_sensor.octopus_intelligent_octopus_saving_session_available`** — `ON` if a saving session is upcoming
691
+ - **`sensor.octopus_intelligent_octopus_saving_session_start`** / **`sensor.octopus_intelligent_octopus_saving_session_end`** — start and end times
504
692
 
505
693
  ### Why These Sensors Are Null Outside Season
506
694
 
507
- The Octopus API only returns free electricity and saving session data when those programmes are active. Outside their respective seasons the API returns an empty list (or in the case of saving sessions, the query itself is unavailable). The node handles this gracefully:
695
+ The Octopus API only returns free electricity and saving session data when those programmes are active. Outside their seasons the API returns an empty list (or for saving sessions, the query itself is unavailable). When that happens:
508
696
 
509
- - Binary sensors remain `OFF` (not `unavailable`)
510
- - Timestamp sensors (`saving_session_start`, `free_electricity_start`, etc.) return `null`
511
- - In Home Assistant, `null`-valued configuration sensors may show as **unavailable** — this is normal and expected
697
+ - Binary sensors stay `OFF` (not `unavailable`)
698
+ - Timestamp sensors (`saving_session_start`, `free_electricity_start`, etc.) are `null`
699
+ - In Home Assistant, sensors with a `null` value may show as **unavailable**. This is normal.
512
700
 
513
701
  ---
514
702
 
515
703
  ## 🌍 Timezone Configuration
516
704
 
705
+ The runtime timezone changes slot and window display times. Daily consumption is always grouped by the Timezone field in the node editor. If that field is blank, the node uses UTC.
706
+
517
707
  By default, slot and window times are converted to the **server's auto-detected timezone** (wherever Node-RED is running). Three ways to configure:
518
708
 
519
709
  ### Option 1: Node Config (static)
@@ -525,7 +715,7 @@ Set a fixed IANA timezone in the node editor:
525
715
  Use the **Timezone** select entity in Home Assistant:
526
716
  - Home Assistant → Octopus Intelligent device → Timezone
527
717
  - Change takes effect on next poll
528
- - Persists across Node-RED restarts
718
+ - The node keeps the value in node context. It survives a restart only if you set a persistent context store in `settings.js`.
529
719
 
530
720
  ### Option 3: `set_timezone` Input Command
531
721
  ```javascript
@@ -543,7 +733,7 @@ msg.payload = { set_timezone: "Europe/London" };
543
733
  ### Supported Timezones (HA select)
544
734
  `Europe/London`, `Europe/Berlin`, `Europe/Madrid`, `Australia/Sydney`, `Australia/Melbourne`, `Australia/Brisbane`, `Australia/Perth`, `Australia/Adelaide`, `Pacific/Auckland`, `America/New_York`, `America/Chicago`, `America/Denver`, `America/Los_Angeles`, `Asia/Tokyo`, `UTC`
545
735
 
546
- Any valid IANA timezone works in the node config field or `set_timezone` command.
736
+ Use an IANA name such as `Europe/London`, of up to 64 characters. The node checks the name. A name it does not know writes an error to the Node-RED log, and the timezone is not changed. Changing the timezone with `set_timezone` does not update the Timezone select in Home Assistant.
547
737
 
548
738
  ---
549
739
 
@@ -552,9 +742,11 @@ Any valid IANA timezone works in the node config field or `set_timezone` command
552
742
  ### Basic Monitoring
553
743
 
554
744
  ```
555
- [Inject: Every 5 min] → [Octopus Intelligent] → [Debug]
745
+ [Octopus Intelligent] → [Debug]
556
746
  ```
557
747
 
748
+ The node polls on its own after deploy. Connect a Debug node to see the output. Add an Inject node only when you want to force a refresh.
749
+
558
750
  ### Set Preferences from Flow
559
751
 
560
752
  ```javascript
@@ -565,7 +757,7 @@ msg.payload = {
565
757
  return msg;
566
758
  ```
567
759
 
568
- Ready-by time: any half-hour slot from 00:00 to 23:30 (matches the Octopus app). Other values are rejected with an error and nothing is sent to Octopus. Charge limit values clamp to 5–100 and round to 5; non-numeric values and `set_limit: 0` are rejected.
760
+ The ready-by time can be any half-hour slot from 00:00 to 23:30, as in the Octopus app. Any other value gives a node error and nothing is sent to Octopus. The node clamps the charge limit to between 5 and 100 and rounds it to the nearest 5. A limit that is not a number above 0, such as `set_limit: 0`, gives a node error.
569
761
 
570
762
  ### Set Timezone from Flow
571
763
 
@@ -574,6 +766,14 @@ msg.payload = { set_timezone: "Australia/Sydney" };
574
766
  return msg;
575
767
  ```
576
768
 
769
+ ### Refresh from a Flow
770
+
771
+ Send any message without a command to refresh the charging data right away. An empty inject works. So does `{ refresh: true }`.
772
+
773
+ - There is no cooldown on this input. Add your own limit in the flow if you need one.
774
+ - A message that carries a command never starts a refresh.
775
+ - A refresh updates the charging data only. It does not refresh rates, gas, or account data.
776
+
577
777
  ### Toggle Smart Charging from Flow
578
778
 
579
779
  ```javascript
@@ -595,17 +795,61 @@ msg.payload = { set_charge_cap: true }; // limit smart charging to off-peak ra
595
795
  msg.payload = { set_charge_cap: false };
596
796
  ```
597
797
 
598
- Non-boolean values are ignored. Also available as the **Charge Cap** switch in Home Assistant.
798
+ The node ignores any value other than `true` or `false`. The **Charge Cap** switch in Home Assistant does the same job.
799
+
800
+ ### `set_boost`
801
+
802
+ ```js
803
+ msg.payload = { set_boost: true }; // charge now, outside the Octopus plan
804
+ msg.payload = { set_boost: false }; // cancel the boost
805
+ ```
806
+
807
+ Only `true` and `false` work. Any other value, such as `"true"` or `1`, gives a node error and sends nothing. The **Boost Charge** switch in Home Assistant does the same job.
808
+
809
+ This is not the same as `set_smart_charging`, which pauses or resumes Octopus control. Octopus can refuse a boost, for example when the car is unplugged. The node logs the Octopus error (for example `Boost request failed: KT-CT-xxxx: message`) and does not retry. If Octopus refuses the same choice 3 times in 10 minutes, the node ignores that choice for the next 10 minutes and logs one warning. This stops a flow that asks again after each refusal from calling Octopus all day. A request Octopus accepts ends the pause.
810
+
811
+ The node sends one boost request at a time, at least 5 seconds apart. If you change your mind while one is being sent, only your last choice is sent next. A repeat of a choice Octopus has just accepted is dropped. After a failure, the same choice is sent again once the 5 seconds have passed. If Octopus does not answer a boost request within 75 seconds, the node gives up on it, sets `boost_error` and polls Octopus to check. Later requests are then sent as normal.
812
+
813
+ When Octopus accepts a boost or a cancel, the node polls Octopus soon after. That poll waits if 3 planned-dispatch queries have already gone out in the last minute. Octopus can take a moment to show the new state, so the switch shows what you asked for until Octopus agrees, for up to 2 minutes. After a refusal the node does not poll, because nothing changed. If the answer is not clear, for example an error on the part Octopus reads back, the node leaves the switch as it was, sets no `boost_error` and polls to check.
814
+
815
+ Payload fields:
816
+
817
+ - `boosting`: `true` while a boost runs, `false` when not, `null` until known. It goes back to `null` if no charging poll has confirmed it for twice the refresh interval, for example during an Octopus outage. `charging_now` then follows the plan again, and the Boost Charge switch shows unknown.
818
+ - `boost_error`: the error from the last `set_boost` that failed. It is sent as soon as the request fails. A boost that works clears it, and so does the first charging poll that reads the device state a minute or more later.
819
+ - `charging_now`: a boost counts as charging, so this is `true` during a boost even with no planned slot.
599
820
 
600
821
  ### Combining commands
601
822
 
602
- One message can carry several commands, and each is applied independently:
823
+ One message can carry several commands, and the node applies each one separately.
603
824
 
604
825
  ```js
605
826
  msg.payload = { set_limit: 90, set_time: "06:30", set_charge_cap: true };
606
827
  ```
607
828
 
608
- `set_limit` and `set_time` are sent to Octopus together, so an invalid value in either rejects both; other commands in the same message still apply.
829
+ The node sends `set_limit` and `set_time` to Octopus together, so a bad value in either one stops both. The other commands in the same message still apply. A message with only one of them sends the last confirmed value for the other. To change both values, send them in one message.
830
+
831
+ `set_smart_charging` and `set_charge_cap` need `true` or `false`. Any other value is ignored with no error. The text `"true"` does not count. `set_timezone` needs a timezone name such as `Europe/London`. An empty value is ignored. A bad `set_limit`, `set_time` or `set_timezone` value writes an error to the Node-RED log.
832
+
833
+ ### Example Flows
834
+
835
+ The `examples/` folder has flows you can import. In Node-RED, open **Menu** → **Import** → **Examples** → **node-red-contrib-octopus-intelligent**. The folder also has `basic-monitoring.json`, `set-preferences.json`, `mqtt-integration.json`, `node-red-dashboard-flow.json`, and the Home Assistant `ha-dashboard.yaml`.
836
+
837
+ These four flows each open on their own tab, with a Read me comment that explains the settings:
838
+
839
+ - **`boost-on-cheap-or-surplus.json`**: starts a boost when the import rate is at or below a price you set, or when you export more than a set number of kW. It cancels the boost when that ends. Set the limits in the **Decide boost** function. The price rule needs a half-hourly rate schedule. The export rule needs the experimental Inverter option or your own reading.
840
+ - **`charging-and-error-alerts.json`**: sends a short alert when charging or a boost starts or stops, when any `*_error` field gets a value, changes, or clears, and when Octopus posts a new alert for your car or charge point. Replace the debug node with your notifier.
841
+ - **`cheapest-window-planner.json`**: each evening, finds the cheapest run of half hours for an appliance that must finish by a set time. It sends a second message when that window starts, which you can wire to a smart plug.
842
+ - **`daily-charging-summary.json`**: sends a morning summary of the charging sessions that ended in the last 24 hours, and a short message when a session finishes. It needs a car or charge point under Octopus SmartFlex control.
843
+
844
+ #### Wiring an example to your node
845
+
846
+ These four flows have no Octopus Intelligent node of their own. Use the node you already have. Each node polls Octopus by itself, so a second node on the same account doubles your API use.
847
+
848
+ 1. Add a **link out** node after your Octopus Intelligent node, and wire the node's output to it.
849
+ 2. Open the link out node and tick **From Octopus node** on the example's tab.
850
+ 3. Only `boost-on-cheap-or-surplus.json` sends commands back. For that flow, add a **link in** node and wire it to your node's input. Then open **To Octopus node** on the example's tab and tick that link in.
851
+
852
+ If your node is on the same tab as the example, you can delete the link nodes and wire it directly.
609
853
 
610
854
  ### Output Format
611
855
 
@@ -623,6 +867,8 @@ msg.payload = { set_limit: 90, set_time: "06:30", set_charge_cap: true };
623
867
  "charging_now": false,
624
868
  "smart_charging": true,
625
869
  "charge_cap": false,
870
+ "boosting": false,
871
+ "boost_error": null,
626
872
  "next_poll": "2026-05-03T10:35:00Z",
627
873
  "refresh_available_at": null,
628
874
  "api_requests_hour": 12,
@@ -679,11 +925,11 @@ msg.payload = { set_limit: 90, set_time: "06:30", set_charge_cap: true };
679
925
  "octoplus_loyalty_points_user": true,
680
926
  "octoplus_error": null,
681
927
  "wheel_of_fortune_electricity_spins": 2,
682
- "wheel_of_fortune_electricity_max": 3,
683
- "wheel_of_fortune_electricity_used": 1,
928
+ "wheel_of_fortune_electricity_max": null,
929
+ "wheel_of_fortune_electricity_used": null,
684
930
  "wheel_of_fortune_gas_spins": 1,
685
- "wheel_of_fortune_gas_max": 1,
686
- "wheel_of_fortune_gas_used": 0,
931
+ "wheel_of_fortune_gas_max": null,
932
+ "wheel_of_fortune_gas_used": null,
687
933
  "wheel_of_fortune_error": null,
688
934
  "mini_demand_kw": 0.082,
689
935
  "mini_consumption_delta_kwh": 0.002,
@@ -699,33 +945,35 @@ msg.payload = { set_limit: 90, set_time: "06:30", set_charge_cap: true };
699
945
  "free_electricity_available": false,
700
946
  "free_electricity_start": null,
701
947
  "free_electricity_end": null,
702
- "free_electricity_error": null
703
- },
704
- "debug": {
705
- "success": true,
706
- "step": "complete",
707
- "apiCalls": [
708
- {"name": "authentication", "tokenObtained": true},
709
- {"name": "intelligent", "slotsFound": 1},
710
- {"name": "electricity_rates", "success": true},
711
- {"name": "electricity_consumption", "success": true},
712
- {"name": "gas_rates", "success": true},
713
- {"name": "gas_consumption", "success": true},
714
- {"name": "home_mini", "success": true},
715
- {"name": "account", "success": true}
716
- ]
948
+ "free_electricity_error": null,
949
+ "vehicle_make": "Tesla",
950
+ "vehicle_model": "Model 3",
951
+ "vehicle_battery_kwh": 75,
952
+ "charger_power_kw": 7.4,
953
+ "device_state": "SMART_CONTROL_IN_PROGRESS",
954
+ "device_alerts": [],
955
+ "last_session": null,
956
+ "charging_sessions": [],
957
+ "last_session_kwh": null,
958
+ "last_session_soc_final": null,
959
+ "last_session_problem": null,
960
+ "smartflex_vehicle_error": null
717
961
  }
718
962
  }
719
963
  ```
720
964
 
721
965
  > **Note:** `electricity_unit_rate` is `null` for half-hourly tariffs (e.g. Intelligent Octopus Go). Use `applicable_rates_current_pence` for the live rate on HH tariffs.
722
966
 
967
+ > **v1.7.0 additions:** The SmartFlex vehicle fields are at the end of the example. See SmartFlex Vehicle Data above. With the Inverter option ticked, the payload also carries the inverter fields. See SmartFlex Inverter Data above.
968
+
723
969
  > **v1.3.0 additions:** The example above shows the v1.2.x payload shape for clarity. v1.3.0 adds ~14 additional fields covering electricity export (`electricity_export_unit_rate`, `electricity_export_tariff_code`, `electricity_export_consumption_kwh`, full `electricity_export_rate[]` half-hourly array with current/prev/next slot summaries) and import rate adjacency (`applicable_rates_prev_pence`, `_prev_gbp`, `_prev_to`, `_next_pence`, `_next_gbp`, `_next_from`). For the authoritative current set, inspect `msg.payload` in a Debug node after a real poll, or read `lib/payload.js` in the source.
724
970
 
725
971
  ---
726
972
 
727
973
  ## 🏡 Home Assistant Automation Examples
728
974
 
975
+ The entity ids below are the ones Home Assistant gives on a fresh install: the device name, then the entity name, for example `binary_sensor.octopus_intelligent_octopus_charging_now`. If you renamed the device or have two accounts, yours can differ. Check them in **Settings** → **Entities**.
976
+
729
977
  ### Notify When Charging Starts
730
978
 
731
979
  ```yaml
@@ -733,7 +981,7 @@ automation:
733
981
  - alias: "EV Charging Starting"
734
982
  trigger:
735
983
  platform: state
736
- entity_id: binary_sensor.octopus_charging_now
984
+ entity_id: binary_sensor.octopus_intelligent_octopus_charging_now
737
985
  to: "on"
738
986
  action:
739
987
  service: notify.mobile_app
@@ -748,7 +996,7 @@ automation:
748
996
  - alias: "Start battery charge on free electricity"
749
997
  trigger:
750
998
  platform: state
751
- entity_id: binary_sensor.octopus_free_electricity_active
999
+ entity_id: binary_sensor.octopus_intelligent_octopus_free_electricity_active
752
1000
  to: "on"
753
1001
  action:
754
1002
  service: switch.turn_on
@@ -757,7 +1005,7 @@ automation:
757
1005
  - alias: "Stop battery charge after free electricity"
758
1006
  trigger:
759
1007
  platform: state
760
- entity_id: binary_sensor.octopus_free_electricity_active
1008
+ entity_id: binary_sensor.octopus_intelligent_octopus_free_electricity_active
761
1009
  to: "off"
762
1010
  action:
763
1011
  service: switch.turn_off
@@ -776,8 +1024,8 @@ automation:
776
1024
  condition:
777
1025
  - condition: template
778
1026
  value_template: >
779
- {% set start = as_timestamp(states('sensor.octopus_slot_1_start')) %}
780
- {% set end = as_timestamp(states('sensor.octopus_slot_1_end')) %}
1027
+ {% set start = as_timestamp(states('sensor.octopus_intelligent_octopus_slot_1_start')) %}
1028
+ {% set end = as_timestamp(states('sensor.octopus_intelligent_octopus_slot_1_end')) %}
781
1029
  {% set now = as_timestamp(now()) %}
782
1030
  {{ start <= now <= end }}
783
1031
  action:
@@ -793,15 +1041,15 @@ automation:
793
1041
  - alias: "Saving session alert"
794
1042
  trigger:
795
1043
  platform: state
796
- entity_id: binary_sensor.octopus_saving_session_available
1044
+ entity_id: binary_sensor.octopus_intelligent_octopus_saving_session_available
797
1045
  to: "on"
798
1046
  action:
799
1047
  service: notify.mobile_app
800
1048
  data:
801
1049
  message: >
802
1050
  Saving session available:
803
- {{ states('sensor.octopus_saving_session_start') }}
804
- to {{ states('sensor.octopus_saving_session_end') }}
1051
+ {{ states('sensor.octopus_intelligent_octopus_saving_session_start') }}
1052
+ to {{ states('sensor.octopus_intelligent_octopus_saving_session_end') }}
805
1053
  ```
806
1054
 
807
1055
  ---
@@ -810,16 +1058,16 @@ automation:
810
1058
 
811
1059
  ### No Data (All Sensors Null/0)
812
1060
 
813
- Check `msg.debug` output in a Debug node:
1061
+ Check the `*_error` fields in `msg.payload`, the node status, and the Node-RED log.
814
1062
 
815
1063
  - Account format must include `A-` prefix
816
- - Invalid API key — regenerate at Octopus dashboard
817
- - Not on a recognised Octopus tariff (EV sensors require Intelligent Octopus Go)
818
- - Car not plugged in (no slots scheduled) — EV sensors null is normal when no charging is planned
1064
+ - Invalid API key: generate a new one in the Octopus dashboard
1065
+ - Not on a recognised Octopus tariff (EV sensors need Intelligent Octopus Go)
1066
+ - Car not plugged in (no slots scheduled): null EV sensors are normal when no charging is planned
819
1067
 
820
1068
  ### Authentication Failing
821
1069
 
822
- Check `msg.debug.apiCalls[0].errors` for details. Regenerate your API key and update the node configuration.
1070
+ Look at the node status and the Node-RED log for the login error. Regenerate your API key and update the node configuration.
823
1071
 
824
1072
  ### Sensors Unavailable in Home Assistant
825
1073
 
@@ -830,27 +1078,27 @@ Check `msg.debug.apiCalls[0].errors` for details. Regenerate your API key and up
830
1078
 
831
1079
  ### electricity_unit_rate Always Null
832
1080
 
833
- This is expected on half-hourly tariffs like Intelligent Octopus Go. The tariff has no single unit rate — prices vary by half-hour slot. Use `applicable_rates_current_pence` for the live rate instead.
1081
+ This is expected on half-hourly tariffs like Intelligent Octopus Go. The tariff has no single unit rate, because prices vary by half-hour slot. Use `applicable_rates_current_pence` for the live rate instead.
834
1082
 
835
1083
  ### Upgrading from v1.2.x — Sensors Look Different
836
1084
 
837
- v1.3.0 adds ~70 new sensors but does not rename or remove any v1.2 sensors. Existing automations and dashboards continue working unchanged. New sensors appear automatically in Home Assistant after the first poll following upgrade.
1085
+ v1.3.0 adds about 70 new sensors but does not rename or remove any v1.2 sensors. Existing automations and dashboards keep working. The new sensors appear in Home Assistant after the first poll following the upgrade.
838
1086
 
839
1087
  Two existing Octoplus booleans (`octoplus_enrolled` and `octoplus_loyalty_points_user`) move from the `sensor.` domain to `binary_sensor.` in v1.3 because they are boolean values and HA's sensor domain doesn't accept booleans cleanly. If you have automations referencing the old `sensor.` entity IDs, update them to the new `binary_sensor.` IDs after upgrade.
840
1088
 
841
1089
  ### Stale Entities After Early v1.3 Dev Build
842
1090
 
843
- If you installed an early v2 build before final release, some entity IDs may have changed. To clean up stale entities:
1091
+ If you installed an early v1.3 dev build before the final release, some entity IDs may have changed. To clean up stale entities:
844
1092
 
845
1093
  1. In HA → **Settings → Devices & Services → MQTT**
846
1094
  2. Find each stale entity name in Developer Tools → MQTT
847
1095
  3. Publish an **empty retained payload** to its config topic:
848
1096
  ```
849
- Topic: homeassistant/sensor/nodered_A-XXXX_<entity_id>/config
1097
+ Topic: homeassistant/sensor/nodered_A-XXXX_<sensor_id>/config
850
1098
  Payload: (empty)
851
1099
  Retain: ✓
852
1100
  ```
853
- This removes the entity from the broker — HA drops it automatically.
1101
+ This removes the entity config from the broker, and HA then drops the entity.
854
1102
 
855
1103
  ### Home Mini Not Showing
856
1104
 
@@ -860,15 +1108,15 @@ If you installed an early v2 build before final release, some entity IDs may hav
860
1108
 
861
1109
  ### New Category Sensors All Null After Deploy
862
1110
 
863
- Account discovery runs once at startup. If it fails, check `msg.debug` for auth errors, verify your API key, and redeploy.
1111
+ Account discovery runs at startup. If it fails, the node tries again after 30 seconds, 1 minute, and 2 minutes, then every 5 minutes. The node status shows the retry. If it keeps failing, check the Node-RED log for login errors and verify your API key.
864
1112
 
865
1113
  ### Seasonal Sensors Show "Unavailable"
866
1114
 
867
- Saving session sensors are only populated October–March. Free electricity sensors are only populated June–October. Outside season, `null` values cause these sensors to show as unavailable in HA — this is correct behaviour, not a bug.
1115
+ Saving session sensors only have values from October to March, and free electricity sensors from June to October. Outside those months their values are `null`, so HA shows them as unavailable. This is expected.
868
1116
 
869
1117
  ### Changes Not Applying
870
1118
 
871
- This is by design. Use the **Apply Changes** button to submit. This prevents API spam when making multiple adjustments.
1119
+ In Home Assistant, the Target Charge slider and Ready Time dropdown only change the pending values. Press **Apply Changes** to send them to Octopus. This saves API calls when you make several changes.
872
1120
 
873
1121
  ---
874
1122
 
@@ -878,25 +1126,50 @@ This is by design. Use the **Apply Changes** button to submit. This prevents API
878
1126
 
879
1127
  On first deploy, the node queries the Octopus API to detect which products are registered on your account:
880
1128
 
881
- - **Electricity** — always enabled if an electricity agreement exists
882
- - **Gas** — enabled if a gas agreement exists
1129
+ - **Electricity** — enabled if an electricity agreement exists. Untick Electricity in the editor to stop the electricity rates and consumption polls.
1130
+ - **Gas** — enabled if a gas agreement exists, unless you untick Gas in the editor
883
1131
  - **Intelligent EV** — enabled if an EV device is registered (Intelligent Octopus Go)
884
1132
  - **Home Mini** — enabled if a smart meter device is registered AND the Home Mini checkbox is ticked
885
- - **Wheel of Fortune / Saving Sessions / Account** — always polled if credentials are valid
1133
+ - **Saving Sessions / Account / Octoplus** — always polled if credentials are valid
1134
+ - **Wheel of Fortune** — polled only when the Wheel of Fortune checkbox is ticked
886
1135
 
887
- Discovery sets which categories are active. No manual configuration required.
1136
+ Discovery sets which categories are active, so there is nothing to configure by hand.
888
1137
 
889
1138
  ### Category Scheduler
890
1139
 
891
- Each data category polls on its own interval (configurable per category in the node editor). A 1-second clock-aligned scheduler checks which categories are due each tick. Categories poll independently — a slow gas API response does not delay your EV slot update.
1140
+ You set the charging, electricity, gas, Wheel of Fortune, and Home Mini intervals in the editor. Import and export applicable rates use the electricity rates interval. Free electricity is checked every 30 minutes. Saving sessions, account, Octoplus, and charging history are checked every 60 minutes. SmartFlex vehicle data is checked every 30 minutes, and the experimental SmartFlex inverter every 5 minutes when its option is ticked. The update check runs once a day.
1141
+
1142
+ A 1-second clock-aligned scheduler checks which groups are due each tick. Due groups run one after another in a single tick, with one login. The charging poll runs first. A slow call delays the groups after it.
1143
+
1144
+ Polls run on the clock. A 5-minute interval runs at :00, :05, :10, and so on. It does not run 5 minutes after deploy. Next Poll Time is an estimate.
1145
+
1146
+ The node sends a message whenever any group was due in a tick. It also sends one when `charging_now` changes, and when a saving session, free electricity window, or rate slot starts or ends.
1147
+
1148
+ ### MQTT Topics
1149
+
1150
+ The node publishes state to `nodered_octopus/<account>/status` and reads commands from `nodered_octopus/<account>/<command>`. The commands are `set_limit`, `set_time`, `submit_changes`, `refresh`, `set_timezone`, `set_smart_charging`, `set_charge_cap`, and `set_boost`.
1151
+
1152
+ The node ignores retained messages on `submit_changes`, `refresh`, `set_smart_charging`, `set_charge_cap`, and `set_boost`, and logs one warning per topic. The broker would replay a retained command on every restart, so a retained `ON` on `set_boost` would boost again each time. To clear one, publish an empty retained message to that topic. Home Assistant does not retain these commands.
892
1153
 
893
1154
  ### Authentication Flow
894
1155
 
895
1156
  1. **Exchange API key** for a short-lived token
896
- 2. **Run category polls** in parallel — each category makes its own GraphQL query
1157
+ 2. **Run category polls** one after another, charging first. Each group makes its own GraphQL query.
897
1158
  3. **Merge results** into a single payload object
898
1159
  4. **Publish** to Node-RED output + MQTT state topic
899
1160
 
1161
+ ### Charging Poll Errors and Retries
1162
+
1163
+ Every request to Octopus gives up after 30 seconds with no answer. If a poll is still running after 10 minutes, the next poll starts anyway and the Node-RED log shows a warning.
1164
+
1165
+ When the charging poll fails, the node keeps the known plan and the charging timers. If the error is `KT-CT-4340` (planned dispatches) or `KT-CT-4339` (charging preferences), it tries again after 30 seconds, 1 minute, and 2 minutes, then every 2 minutes, until it works or the next normal poll is due. A retry waits if 3 planned-dispatch queries have already gone out in the last minute. Other errors wait for the next normal poll. `intelligent_error` and the node status show a short error with the Octopus code.
1166
+
1167
+ Each failed attempt writes a warning to the Node-RED log, for example `Charging poll failed: KT-CT-4340 Unable to fetch planned dispatches (retry 2 in 60s)`. One line follows when it works again, for example `Charging poll recovered after 4m 30s`.
1168
+
1169
+ If only the charging preferences fail (`KT-CT-4339`), the poll still works. The node keeps the last confirmed target and ready-by time and logs a warning.
1170
+
1171
+ The check 30 seconds before a slot also handles an Octopus error. It logs a warning and starts the slot on time from the known plan.
1172
+
900
1173
  ### Exponential Backoff (preference changes)
901
1174
 
902
1175
  When changing charge limit or ready time:
@@ -912,23 +1185,17 @@ Mutation sent → Wait 15s → Validate
912
1185
  ↓ Then normal interval resumes
913
1186
  ```
914
1187
 
915
- This prevents sensors becoming "unavailable" during updates.
1188
+ Each step polls the charging data. The node stops early once Octopus confirms the new values, and the node status shows the progress.
916
1189
 
917
1190
  ### Debug Information
918
1191
 
919
- Every message includes `msg.debug`:
1192
+ Poll messages carry only `msg.payload`. Check the `*_error` fields, the node status, and the Node-RED log.
920
1193
 
921
- ```json
922
- {
923
- "timestamp": "2026-05-03T10:30:00Z",
924
- "success": true,
925
- "step": "complete",
926
- "apiCalls": [
927
- {"name": "authentication", "tokenObtained": true},
928
- {"name": "intelligent", "slotsFound": 1}
929
- ]
930
- }
931
- ```
1194
+ When `charging_now` changes, the node sends an extra message. That message also carries a `msg.debug` object with `timestamp`, `trigger` (`charging_state_change`), `previous_state`, and `new_state`.
1195
+
1196
+ When a saving session, free electricity window, or rate slot starts or ends, the node also sends an extra message. Its `msg.debug` has `timestamp`, `trigger` (`active_fields_change`), and `changed`, the list of fields that changed.
1197
+
1198
+ When a `set_boost` request fails, the node sends an extra message with `boost_error` set. Its `msg.debug` has `timestamp`, `trigger` (`boost_failed`), `request` (`BOOST` or `CANCEL`), and `error`.
932
1199
 
933
1200
  ---
934
1201
 
@@ -960,44 +1227,7 @@ Use at your own risk. The Octopus Energy name and logo are trademarks of Octopus
960
1227
 
961
1228
  ## 📜 Changelog
962
1229
 
963
- See [CHANGELOG.md](CHANGELOG.md) for detailed version history and release notes.
964
-
965
- ### v1.3.0 (2026-05-12)
966
-
967
- Major additive release — full consumer read coverage. No breaking changes; all v1.2.x entity IDs, payload fields, and automations continue working unchanged.
968
-
969
- **New read categories:**
970
- - **Electricity import** — live unit rate, standing charge, tariff code + validity dates, daily consumption, half-hourly applicable rates (current / prev / next), GBP/kWh rate for Energy Dashboard
971
- - **Electricity export** — full read parity with import: live export rate, standing charge, tariff code (e.g. `AGILE-OUTGOING-19-05-13`), validity dates, daily export consumption, half-hourly export rate slots (48 entries), prev / next slot rates and transition timestamps
972
- - **Gas** — unit rate, standing charge, tariff code + validity, daily consumption (account-conditional)
973
- - **Octopus Home Mini** — real-time grid demand (kW), half-hour consumption (kWh), last reading timestamp
974
- - **Saving sessions** — upcoming session start/end, joined status (now read from `api.backend.octopus.energy`)
975
- - **Free electricity** — upcoming/active session detection, binary sensors for automation
976
- - **Wheel of Fortune** — electricity and gas spin counts (now using non-deprecated `wheelOfFortuneSpinsAllowed` on backend endpoint)
977
- - **Account balance** — credit/debit in £ and pence
978
- - **Octoplus** — enrollment status (string) + enrolled and loyalty-points-user booleans
979
-
980
- **Bug fixes carried in alongside the additive work:**
981
- - **Import / export meter point selection** — meter point selection now uses the `direction` field, not array position. Earlier dev builds on accounts with both import + export meters could surface export data as if it were import (live "current rate" showing the export Agile rate instead of the import tariff). Fixed before release; no stable v1.x build was affected.
982
- - **MQTT transport** — added `User-Agent` header required by `api.backend.octopus.energy`. Without it the backend returns 403 at the edge, which surfaced as "WoF returns HTML" / saving sessions silently broken.
983
- - **MQTT discovery for boolean sensors** — `octoplus_enrolled` and `octoplus_loyalty_points_user` were previously published to the `sensor` MQTT domain; HA's sensor handler doesn't accept raw boolean values cleanly, so the entities never registered on some installs. Now published as `binary_sensor` — registers reliably.
984
- - **MQTT discovery for read-only info sensors** — removed `entity_category: config` from tariff codes, validity dates, etc. That category is intended for user-configurable entities; on read-only sensors HA's state handling caused them to stick at "unavailable". Moved to the main entity list.
985
-
986
- **Backwards compatibility:** zero breaking changes. New entities appear automatically after first poll following upgrade. Existing automations continue unchanged.
987
-
988
- ### v1.2.1 (2026-04-29)
989
- - **Deprecated API migration** — moved to current `devices` query and `setDevicePreferences` mutation
990
-
991
- ### v1.2.0 (2026-04-26)
992
- - **Smart Charging Toggle** — suspend/resume Octopus intelligent charging from Node-RED or Home Assistant
993
- - **HA MQTT Switch** — auto-discovered Smart Charging switch entity
994
- - **`smart_charging` payload field** — live state in every message
995
-
996
- ### v1.0.4 (2025-12-11)
997
- - **Manual Refresh Button** — Force API refresh via Home Assistant with 30s cooldown
998
- - **Next Poll Timer** — See when next automatic refresh occurs
999
- - **API Complexity Monitoring** — Track API usage against 50,000/hour limit
1000
- - **Rate Limiting** — MQTT button (30s cooldown), Node-RED input (no limit)
1230
+ See [CHANGELOG.md](CHANGELOG.md) for the full history.
1001
1231
 
1002
1232
  ---
1003
1233