Repository navigation
Conversation
springfall2008
left a comment
There was a problem hiding this comment.
Automated comment from the triage bot.
Review of head d6fcc8de: 6 findings posted inline, 1 in the body. The icon plumbing itself is clean — apply_currency_icon operates on a fresh copy.deepcopy of CONFIG_ITEMS in reset() so re-runs re-seed correctly, all 22 remaining mdi:currency-usd items carry p/p/kWh units and are swept, and the two re-iconed non-currency items (kWh/minutes) were the only such borrowers. Verified against gh pr diff and the checked-out head.
Body finding — docs/compare.md:151 contradicts the FAQ change
The FAQ now warns: "Do not be tempted to use an 'entity_globs' configuration on the include list as this will flip the whole config into allowlist mode" — and correspondingly replaces include.entity_globs: predbat.compare_tariff_* with individual entity IDs (predbat.compare_tariff_current, <name1>, <name2>). But docs/compare.md line 151 still tells users to do exactly that: "If you have added a recorder: filter that excludes the predbat domain, include them again with an entity_globs entry of predbat.compare_tariff_*". A user following compare.md sets up the very allowlist flip the FAQ warns about — that's the #5507 failure mode. compare.md isn't touched by this PR, so it couldn't be anchored inline: one line there updating the include advice to enumerated entity IDs and pointing at the FAQ example would remove the contradiction.
Body note — issue reference
The PR body cites "#4945 Add Indevolt plug-in battery configuration" twice, but there is no issue or PR #4945 in springfall2008/batpred (verified with gh issue view 4945 and a search). If the reference points at a discussion or an issue in another repo, worth fixing the link.
Good spot by the bot, corrected now
4945 referenced from the PR is a 'show and tell' discussion item, not a GitHub issue, so reference is correct |
…ffs, not entity_globs
springfall2008
left a comment
There was a problem hiding this comment.
Automated comment from the triage bot.
Reviewed at head bbc435b (currency icons, Indevolt template, FAQ recorder rules, doc sweep): no correctness bugs found; 3 low findings posted inline (icon-table data, template comment accuracy, FAQ precision).
What I verified as sound: apply_currency_icon() mutates the per-instance deepcopy of CONFIG_ITEMS (predbat.py:338/349) and runs in reset() before config_index is rebuilt and entities are exposed, so module-level CONFIG_ITEMS stays pristine and each instance gets its own icons; all 14 remaining mdi:currency-usd placeholders sit on p/p/kWh items and no mdi:currency-usd literals remain anywhere outside config.py; the two re-iconed items (mdi:flash, mdi:timer-outline) match their kWh/minutes units; Octopus saving-session icons are now consistently hard-coded gbp, matching the updated test_saving_session.py expectation, and predheat's self.base is long-established; inverter_type: 'Indevolt' builds a valid custom INVERTER_DEF from the GE copy (inverter.py:544-556), the template's bare-dict service blocks are supported (call_service_template wraps a dict in a list), {target_soc}/{power} resolve from adjust_charge_immediate()'s data via resolve_arg(extra_args), and the select_option stop path is a real service; the FAQ's fixed example matches Home Assistant's recorder filter semantics (verified against homeassistant/helpers/entityfilter.py — include.entities rescues domain-level excludes and does not flip the config into default-deny), with compare.md updated to the same recipe; all 5 new tests are registered in TEST_REGISTRY; the pence→currency-minor-unit docs sweep misses only the literal setting name axle_pence_per_kwh; the golden replay cases' .expected.json files pin no icons.
springfall2008
left a comment
There was a problem hiding this comment.
Automated comment from the triage bot.
Re-review at head e5121fff ("update for BOT review comments"): no new findings — 0 inline, 0 in the body. All three items from the 27 Oct automated review are fixed, and I re-verified each fix against its source rather than taking the diff at face value:
apps/predbat/config.py:mdi:currency-vnd(₫) andmdi:currency-chf(CHF) are removed; I fetched all 14 remaining names against the upstream MaterialDesign-SVG repo and every one resolves, so the shipped table contains only real MDI icons. Symbols with no MDI icon (₫, CHF, the kr currencies) now fall throughcurrency_icon()to themdi:cashdefault, which the table comment already prescribes.docs/faq.md: the recorder bullet now namesdomainas well asentity_globs. Re-checked against the currenthomeassistant/helpers/entityfilter.py:have_include = bool(include_e or include_d or include_eg), and onceinclude_d/include_egare non-empty the filter takes Case 4 (entity_filter_4a), whose fall-through is "Otherwise: exclude" — default-deny. The FAQ recipe's plain-entity include stays in Case 5, whereinclude.entitiesoverrides domain/glob excludes without flipping the mode. The new wording is correct.templates/indevolt.yaml: the CRITICALhas_time_windowblock is gone; the setting itself remains, which is harmless.
I also re-checked the resolutions of the earlier review round are present at this head: all five test_currency_icon tests registered in unit_test.py (lines 288–293, 735–740), the Predheat: Todays energy {} kWh, cost {} {} log line in predheat.py:542, the de-duplicated indevolt integration link at docs/inverter-setup.md:53, the "zero or negative" rewording at docs/predbat-plan-card.md:80, and the Indevolt sensor renames in docs/inverter-setup.md — "Indevolt SoC kWh" and "Indevolt Grid Power (inverted)" now slugify to exactly sensor.indevolt_soc_kwh / sensor.indevolt_grid_power_inverted, the IDs templates/indevolt.yaml references (verified against HA's slugify, which delegates to python-slugify).
The GBP hardcodes in the Octopus/Kraken components remain as the author explained in the review thread (UK-only components), which is a reasonable documented trade-off.
modified: docs/inverter-setup.md modified: templates/solax_sx4.yaml
modified: apps/predbat/tests/test_docs_solax_mode8.py modified: docs/inverter-setup.md modified: templates/solax_sx4.yaml
New feature:
NB: Icons for entities created by the Kraken and Octopus components remain hard-coded to currency-gbp and are not been auto-generated as these components are only used by UK customers so the extra complexity of passing the icon through to the components wasn't felt justified nor needed.
Fix:
New inverter type:
Documentation changes: