Repository navigation
Commit b88cbd8
* fix(octopus): choose on purpose between conflicting catalogue entries for a car (#5438)
Octopus's charge-point and vehicle catalogue isn't unique by make and
model: myenergi's "zappi (all models)" is listed at both 7.400 and 22.000
kW, and 142 charge-point and 169 vehicle names in the current catalogue
map to more than one value. The device record gives only the make and
model to match on, and the lookup kept whichever match came last, so a
7.4 kW zappi was planned at 22 kW. fetch.py then takes the larger of that
and car_charging_rate, so the user's own setting couldn't bring it back
down.
catalogue_value() now gathers every matching value and, when they
disagree, picks one on purpose:
- A charge point gets the lowest power listed: the most every variant can
do. Since Octopus's figure only ever raises car_charging_rate, a user
with a faster charger can still set the rate higher, and the warning
says so.
- A vehicle gets the largest battery size listed, so the car's remaining
charge is over- rather than under-estimated. Using no value instead
would fall back to car_charging_battery_size, which is 100 kWh when it
isn't set.
The component warns once per make and model. The warning names the
values and the one in use. For a charger it also says that
input_number.predbat_car_charging_rate decides the rate when it's
higher; for a vehicle it says car_charging_battery_size can't change it.
It also converts the figures to float, ignoring any that are missing,
non-numeric, non-finite or not above zero. GraphQL returns them as
strings ("22.000"), which the discovery coordinator's ratings container
refused ("value does not fit the container's type - dropped"). The
planner was unaffected by that part, because fetch.py already converts
them.
Two things are deliberately left alone:
- fetch.py's max(rate, car_charging_rate), whose misleading "Octopus over
reports" comment is corrected. It was added in #2855, and the default
car_charging_rate (7.4) can't be told apart from one the user set, so
letting it cap the Octopus figure could lower the rate for owners of
faster chargers who rely on it.
- An Octopus battery size still replaces car_charging_battery_size. The
issue asked for the configured size to be able to win, but four
templates (givenergy_cloud, givenergy_ems, huawei, solaredge) ship
car_charging_battery_size: [75] uncommented. Users of those templates
would lose the real size from Octopus for the template's placeholder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(octopus): name the car charging rate setting with the entity prefix in use (#5438)
The ambiguous-charger warning told the user to set
input_number.predbat_car_charging_rate, but the entity prefix is
configurable (apps.yaml prefix), so with a custom prefix it named an
entity that doesn't exist. It now uses the component's own prefix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 5001c8e commit b88cbd8
5 files changed
Lines changed: 352 additions & 15 deletions
File tree
- apps/predbat
- tests
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1562 | 1562 | | |
1563 | 1563 | | |
1564 | 1564 | | |
1565 | | - | |
| 1565 | + | |
| 1566 | + | |
1566 | 1567 | | |
1567 | 1568 | | |
1568 | 1569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
59 | 72 | | |
60 | 73 | | |
61 | 74 | | |
| |||
90 | 103 | | |
91 | 104 | | |
92 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
93 | 149 | | |
94 | 150 | | |
95 | 151 | | |
| |||
628 | 684 | | |
629 | 685 | | |
630 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
631 | 690 | | |
632 | 691 | | |
633 | 692 | | |
| |||
2424 | 2483 | | |
2425 | 2484 | | |
2426 | 2485 | | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
2427 | 2511 | | |
2428 | 2512 | | |
2429 | 2513 | | |
| |||
2526 | 2610 | | |
2527 | 2611 | | |
2528 | 2612 | | |
2529 | | - | |
2530 | | - | |
2531 | | - | |
2532 | | - | |
2533 | | - | |
2534 | | - | |
| 2613 | + | |
| 2614 | + | |
2535 | 2615 | | |
2536 | | - | |
2537 | | - | |
2538 | | - | |
2539 | | - | |
2540 | | - | |
2541 | | - | |
| 2616 | + | |
| 2617 | + | |
2542 | 2618 | | |
2543 | 2619 | | |
2544 | 2620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
0 commit comments