node-red-contrib-octopus-intelligent 1.4.0 → 1.5.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,40 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.5.0] — 2026-06-13
9
+
10
+ Schedule visibility, tariff rate bands, proactive update notification, and a Node-RED Dashboard 2.0 example.
11
+
12
+ ### Added — Schedule visibility (import & export)
13
+ - 24h schedule stats: `applicable_rates_{min,max,median,avg}_pence` and `electricity_export_rate_*` equivalents — min/max/median/avg over the next 24h of half-hourly rates.
14
+ - The full `applicable_rates` / `electricity_export_rate` slot arrays are now exposed as MQTT entity attributes on the existing `*_count` sensors, accessible via `state_attr(...)` in HA templates.
15
+
16
+ ### Added — Tariff rate bands
17
+ - `electricity_day_rate`, `electricity_night_rate`, `electricity_ev_peak_rate`, `electricity_ev_off_peak_rate` — raw tariff-defined bands from the Kraken `DayNightTariff` / `FourRateEvTariff` types. Null on tariffs without banding (half-hourly/Agile users see nulls; Economy 7 / FourRateEv users see values).
18
+
19
+ ### Added — Update notification
20
+ - HA MQTT Update entity (`update.octopus_intelligent_node_update`) surfacing newer-version availability in HA's Settings → Updates panel. Requires HA ≥ 2022.4.
21
+ - Node-RED debug log emits `node.warn` once per detected new version, with install instructions.
22
+ - New payload fields: `installed_version`, `latest_version`, `update_available`, `update_check_at`, `update_check_error`. Checked once per 24h via the unified scheduler.
23
+
24
+ ### Added — Promotion to MQTT entities (closing v1.3.0 gaps)
25
+ - 8 previously payload-only fields promoted to MQTT entities: `applicable_rates_prev_pence/_gbp/_to`, `applicable_rates_next_pence/_gbp/_from`, `electricity_export_rate_prev_gbp`, `electricity_export_rate_next_gbp`.
26
+
27
+ ### Added — Per-category error binary sensors
28
+ - 15 new `binary_sensor`s with `device_class: problem`, one per category. `OFF` when healthy / `ON` when the corresponding `<category>_error` payload field is set. Existing string error sensors retained — no breakage.
29
+
30
+ ### Added — Node-RED Dashboard 2.0 example
31
+ - `examples/node-red-dashboard-flow.json` — importable Dashboard 2.0 flow with 32 widgets across 6 pages (Controls, Status, Tariff, Optimization, Account, Diagnostics), plus writable controls routed back into the node input.
32
+ - Two annotated **sample function nodes** (`find-cheapest-window`, `is-cheapest-now`) demonstrating user-side derivation over `applicable_rates`. Example code only — not part of the published payload, keeping with the "expose raw data, no inference" principle.
33
+
34
+ ### Fixed — Example HA dashboard (`examples/ha-dashboard.yaml`)
35
+ - Home Mini live-demand gauge now floors at `-10 kW` (was `min: 0`) so solar export displays, with the green severity band extended to cover the negative range.
36
+ - Tariff rate-bands card is hidden on half-hourly/Agile tariffs (null bands render to `"None"`/`unknown`, not `unavailable` — the conditional now excludes all three).
37
+ - Gas cards are hidden for electricity-only homes (gated on `gas_tariff_code`).
38
+
39
+ ### Backwards compatibility
40
+ - All existing payload field names, MQTT topics, HA entity `unique_id`s, input commands, and node config fields are preserved. v1.4.0 → v1.5.0 is a zero-config upgrade.
41
+
8
42
  ## [1.4.0] — 2026-05-29
9
43
 
10
44
  Single poll loop. The V1 `setInterval(fetchData)` intelligent loop and the V2 `createScheduler(pollDueCategories)` category loop are merged into one clock-aligned scheduler with one auth and one emit per tick. No HA-side changes.
@@ -4,14 +4,16 @@ path: octopus-intelligent
4
4
  icon: mdi:lightning-bolt
5
5
  max_columns: 4
6
6
  # ────────────────────────────────────────────────────────────────────────────────
7
- # Octopus Intelligent — comprehensive v1.3.0 dashboard
7
+ # Octopus Intelligent — comprehensive v1.5.0 dashboard
8
8
  #
9
9
  # Each section is a single focused card so the sections view packs them into a
10
10
  # uniform grid without big empty gaps. On wide screens HA renders up to 4
11
11
  # columns; narrower viewports collapse to fewer columns automatically.
12
12
  #
13
13
  # Covers every MQTT entity published by node-red-contrib-octopus-intelligent
14
- # v1.3.0. Fresh install entity-id prefix: octopus_intelligent_octopus_*.
14
+ # v1.5.0 (adds tariff rate bands, 24h schedule stats, the Update entity, and
15
+ # per-category error binary_sensors over the v1.3.0 baseline).
16
+ # Fresh install entity-id prefix: octopus_intelligent_octopus_*.
15
17
  # Upgraders from pre-v1.0 may have node_red_octopus_intelligent_octopus_*
16
18
  # on carry-over entities (see Dev Tools → States to look up the actual ID).
17
19
  # ────────────────────────────────────────────────────────────────────────────────
@@ -127,6 +129,35 @@ sections:
127
129
  - entity: sensor.octopus_intelligent_octopus_electricity_tariff_valid_to
128
130
  name: Valid to
129
131
 
132
+ - type: grid
133
+ cards:
134
+ # Banded-tariff users (Economy 7 / FourRateEv) see this; half-hourly /
135
+ # Agile users have null bands. A null renders to "None"/unknown (not
136
+ # "unavailable"), so all three states must be excluded to hide the card.
137
+ - type: conditional
138
+ conditions:
139
+ - condition: state
140
+ entity: sensor.octopus_intelligent_octopus_electricity_day_rate
141
+ state_not: unavailable
142
+ - condition: state
143
+ entity: sensor.octopus_intelligent_octopus_electricity_day_rate
144
+ state_not: unknown
145
+ - condition: state
146
+ entity: sensor.octopus_intelligent_octopus_electricity_day_rate
147
+ state_not: "None"
148
+ card:
149
+ type: entities
150
+ title: Tariff rate bands
151
+ entities:
152
+ - entity: sensor.octopus_intelligent_octopus_electricity_day_rate
153
+ name: Day rate
154
+ - entity: sensor.octopus_intelligent_octopus_electricity_night_rate
155
+ name: Night rate
156
+ - entity: sensor.octopus_intelligent_octopus_electricity_ev_off_peak_rate
157
+ name: EV off-peak rate
158
+ - entity: sensor.octopus_intelligent_octopus_electricity_ev_peak_rate
159
+ name: EV peak rate
160
+
130
161
  - type: grid
131
162
  cards:
132
163
  - type: entities
@@ -215,44 +246,110 @@ sections:
215
246
  - entity: sensor.octopus_intelligent_octopus_electricity_export_rate_next_from
216
247
  name: Next from
217
248
 
218
- # ════════════════════════════════════════════════════════════════════════════
219
- # Gas
220
- # ════════════════════════════════════════════════════════════════════════════
221
249
  - type: grid
222
250
  cards:
223
251
  - type: glance
224
- title: Gas — live
252
+ title: Import — 24h schedule stats
225
253
  entities:
226
- - entity: sensor.octopus_intelligent_octopus_gas_unit_rate
227
- name: Rate
228
- - entity: sensor.octopus_intelligent_octopus_gas_standing_charge
229
- name: Standing
230
- - entity: sensor.octopus_intelligent_octopus_gas_consumption
231
- name: Today (kWh)
254
+ - entity: sensor.octopus_intelligent_octopus_applicable_rates_min
255
+ name: Min
256
+ - entity: sensor.octopus_intelligent_octopus_applicable_rates_median
257
+ name: Median
258
+ - entity: sensor.octopus_intelligent_octopus_applicable_rates_avg
259
+ name: Avg
260
+ - entity: sensor.octopus_intelligent_octopus_applicable_rates_max
261
+ name: Max
232
262
 
233
263
  - type: grid
234
264
  cards:
235
- - type: entities
236
- title: Gas — tariff
237
- icon: mdi:fire
265
+ - type: glance
266
+ title: Export — 24h schedule stats
238
267
  entities:
239
- - entity: sensor.octopus_intelligent_octopus_gas_tariff_code
240
- name: Tariff code
241
- - entity: sensor.octopus_intelligent_octopus_gas_tariff_valid_from
242
- name: Valid from
243
- - entity: sensor.octopus_intelligent_octopus_gas_tariff_valid_to
244
- name: Valid to
268
+ - entity: sensor.octopus_intelligent_octopus_electricity_export_rate_min
269
+ name: Min
270
+ - entity: sensor.octopus_intelligent_octopus_electricity_export_rate_median
271
+ name: Median
272
+ - entity: sensor.octopus_intelligent_octopus_electricity_export_rate_avg
273
+ name: Avg
274
+ - entity: sensor.octopus_intelligent_octopus_electricity_export_rate_max
275
+ name: Max
245
276
 
277
+ # ════════════════════════════════════════════════════════════════════════════
278
+ # Gas
279
+ # ════════════════════════════════════════════════════════════════════════════
280
+ # Gas cards hidden for electricity-only homes — gated on gas tariff code
281
+ # being a real value (null → "None"/unknown for no-gas accounts).
246
282
  - type: grid
247
283
  cards:
248
- - type: entities
249
- title: Gas — consumption window
250
- icon: mdi:calendar-clock
251
- entities:
252
- - entity: sensor.octopus_intelligent_octopus_gas_consumption_from
253
- name: From
254
- - entity: sensor.octopus_intelligent_octopus_gas_consumption_to
255
- name: To
284
+ - type: conditional
285
+ conditions:
286
+ - condition: state
287
+ entity: sensor.octopus_intelligent_octopus_gas_tariff_code
288
+ state_not: unavailable
289
+ - condition: state
290
+ entity: sensor.octopus_intelligent_octopus_gas_tariff_code
291
+ state_not: unknown
292
+ - condition: state
293
+ entity: sensor.octopus_intelligent_octopus_gas_tariff_code
294
+ state_not: "None"
295
+ card:
296
+ type: glance
297
+ title: Gas — live
298
+ entities:
299
+ - entity: sensor.octopus_intelligent_octopus_gas_unit_rate
300
+ name: Rate
301
+ - entity: sensor.octopus_intelligent_octopus_gas_standing_charge
302
+ name: Standing
303
+ - entity: sensor.octopus_intelligent_octopus_gas_consumption
304
+ name: Today (kWh)
305
+
306
+ - type: grid
307
+ cards:
308
+ - type: conditional
309
+ conditions:
310
+ - condition: state
311
+ entity: sensor.octopus_intelligent_octopus_gas_tariff_code
312
+ state_not: unavailable
313
+ - condition: state
314
+ entity: sensor.octopus_intelligent_octopus_gas_tariff_code
315
+ state_not: unknown
316
+ - condition: state
317
+ entity: sensor.octopus_intelligent_octopus_gas_tariff_code
318
+ state_not: "None"
319
+ card:
320
+ type: entities
321
+ title: Gas — tariff
322
+ icon: mdi:fire
323
+ entities:
324
+ - entity: sensor.octopus_intelligent_octopus_gas_tariff_code
325
+ name: Tariff code
326
+ - entity: sensor.octopus_intelligent_octopus_gas_tariff_valid_from
327
+ name: Valid from
328
+ - entity: sensor.octopus_intelligent_octopus_gas_tariff_valid_to
329
+ name: Valid to
330
+
331
+ - type: grid
332
+ cards:
333
+ - type: conditional
334
+ conditions:
335
+ - condition: state
336
+ entity: sensor.octopus_intelligent_octopus_gas_tariff_code
337
+ state_not: unavailable
338
+ - condition: state
339
+ entity: sensor.octopus_intelligent_octopus_gas_tariff_code
340
+ state_not: unknown
341
+ - condition: state
342
+ entity: sensor.octopus_intelligent_octopus_gas_tariff_code
343
+ state_not: "None"
344
+ card:
345
+ type: entities
346
+ title: Gas — consumption window
347
+ icon: mdi:calendar-clock
348
+ entities:
349
+ - entity: sensor.octopus_intelligent_octopus_gas_consumption_from
350
+ name: From
351
+ - entity: sensor.octopus_intelligent_octopus_gas_consumption_to
352
+ name: To
256
353
 
257
354
  # ════════════════════════════════════════════════════════════════════════════
258
355
  # Account / Octoplus / Rewards / Mini
@@ -344,10 +441,12 @@ sections:
344
441
  entity: sensor.octopus_intelligent_octopus_home_mini_demand
345
442
  name: Home Mini — live demand
346
443
  unit: kW
347
- min: 0
444
+ min: -10
348
445
  max: 10
446
+ # green starts at min so the export (negative-demand) range is
447
+ # coloured rather than left grey below the 0 threshold.
349
448
  severity:
350
- green: 0
449
+ green: -10
351
450
  yellow: 3
352
451
  red: 6
353
452
 
@@ -454,33 +553,47 @@ sections:
454
553
  title: Diagnostic — errors
455
554
  icon: mdi:alert-circle
456
555
  entities:
457
- - entity: sensor.octopus_intelligent_octopus_electricity_rates_error
556
+ - entity: binary_sensor.octopus_intelligent_octopus_electricity_rates_error_state
458
557
  name: Electricity rates
459
- - entity: sensor.octopus_intelligent_octopus_electricity_consumption_error
558
+ - entity: binary_sensor.octopus_intelligent_octopus_electricity_consumption_error_state
460
559
  name: Electricity consumption
461
- - entity: sensor.octopus_intelligent_octopus_gas_rates_error
560
+ - entity: binary_sensor.octopus_intelligent_octopus_gas_rates_error_state
462
561
  name: Gas rates
463
- - entity: sensor.octopus_intelligent_octopus_gas_consumption_error
562
+ - entity: binary_sensor.octopus_intelligent_octopus_gas_consumption_error_state
464
563
  name: Gas consumption
465
- - entity: sensor.octopus_intelligent_octopus_applicable_rates_error
564
+ - entity: binary_sensor.octopus_intelligent_octopus_applicable_rates_error_state
466
565
  name: Applicable rates
467
- - entity: sensor.octopus_intelligent_octopus_electricity_export_rate_error
566
+ - entity: binary_sensor.octopus_intelligent_octopus_electricity_export_rate_error_state
468
567
  name: Applicable rates — export
469
- - entity: sensor.octopus_intelligent_octopus_account_error
568
+ - entity: binary_sensor.octopus_intelligent_octopus_account_error_state
470
569
  name: Account
471
- - entity: sensor.octopus_intelligent_octopus_octoplus_error
570
+ - entity: binary_sensor.octopus_intelligent_octopus_octoplus_error_state
472
571
  name: Octoplus
473
- - entity: sensor.octopus_intelligent_octopus_wof_error
572
+ - entity: binary_sensor.octopus_intelligent_octopus_wheel_of_fortune_error_state
474
573
  name: WoF
475
- - entity: sensor.octopus_intelligent_octopus_home_mini_error
574
+ - entity: binary_sensor.octopus_intelligent_octopus_home_mini_error_state
476
575
  name: Home Mini
477
- - entity: sensor.octopus_intelligent_octopus_saving_sessions_error
576
+ - entity: binary_sensor.octopus_intelligent_octopus_saving_sessions_error_state
478
577
  name: Saving sessions
479
- - entity: sensor.octopus_intelligent_octopus_free_electricity_error
578
+ - entity: binary_sensor.octopus_intelligent_octopus_free_electricity_error_state
480
579
  name: Free electricity
481
- - entity: sensor.octopus_intelligent_octopus_intelligent_error
580
+ - entity: binary_sensor.octopus_intelligent_octopus_intelligent_error_state
482
581
  name: Intelligent
483
- - entity: sensor.octopus_intelligent_octopus_completed_dispatches_error
582
+ - entity: binary_sensor.octopus_intelligent_octopus_completed_dispatches_error_state
484
583
  name: Completed dispatches
485
- - entity: sensor.octopus_intelligent_octopus_flex_planned_dispatches_error
584
+ - entity: binary_sensor.octopus_intelligent_octopus_flex_planned_dispatches_error_state
486
585
  name: Flex planned dispatches
586
+
587
+ - type: grid
588
+ cards:
589
+ - type: entities
590
+ title: Update status
591
+ entities:
592
+ - entity: update.octopus_intelligent_octopus_intelligent_node
593
+ name: Update available
594
+ - entity: sensor.octopus_intelligent_octopus_installed_version
595
+ name: Installed version
596
+ - entity: sensor.octopus_intelligent_octopus_latest_version
597
+ name: Latest version
598
+ - entity: sensor.octopus_intelligent_octopus_update_check_at
599
+ name: Last check