Predbat alert includes prefix name, doc updates - #4846
Conversation
…otification if join was successful
…of hard coded 'predbat'
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ntly doesn't include any response
… car_charging_energy is set
There was a problem hiding this comment.
🟡 Changes recommended
Several doc/example snippets in changed lines contain concrete correctness issues (invalid YAML, inconsistent directory naming, broken Markdown link) and one user-facing notify string change introduces formatting regressions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR improves multi-instance usability by making Predbat notifications prefix-aware, while also updating documentation to reflect Home Assistant’s “apps” terminology and expanding web UI / forecast / output-data guidance.
Changes:
- Update user-visible notifications to include the configured Predbat prefix (capitalised) instead of hard-coding “Predbat”.
- Extend
auto_restarthandling to acceptapp(while retainingaddonfor backward compatibility) and update example configs/docs accordingly. - Refresh/expand docs across web interface, solar forecasting, output data, and installer wording; correct grid-power metric sign description.
File summaries
| File | Description |
|---|---|
| templates/givenergy_givtcp.yaml | Updates auto-restart example to use hassio/app_restart + app: parameter. |
| docs/web-interface.md | Expands/clarifies Web UI pages (Entities/Metrics/PVAccuracy, etc.). |
| docs/predbat-plan-card.md | Doc tweak for rate-symbol descriptions and references to apps.yaml. |
| docs/output-data.md | Updates paths/service examples; expands output-data documentation. |
| docs/load-ml.md | Adds prerequisite guidance (memory note) and minor terminology edits. |
| docs/inverter-setup.md | Formatting fixes and apps.yaml backticks/wording updates. |
| docs/installation-summary.md | Updates install summary wording and config path references. |
| docs/install.md | Adds HA prerequisites + renames Solcast section to Solar Forecast; updates paths. |
| docs/faq.md | Updates references from Solcast-only to “Solar Forecast” generally. |
| docs/energy-rates.md | Adds Strømligning mention and improves apps.yaml wording consistency. |
| docs/devices.md | Minor wording correction (Predbat capitalisation). |
| docs/developing.md | Updates local dev/test instructions wording/path reference. |
| docs/customisation.md | Adds warning about input_number.predbat_best_soc_max impact. |
| docs/configuration-guide.md | Updates Solar Forecast reference link. |
| docs/components.md | Improves apps.yaml references and some component doc wording. |
| docs/compare.md | Improves wording/table formatting and clarifies overrides. |
| docs/car-charging.md | Clarifies EV detection behaviour when car_charging_energy is set. |
| docs/apps-yaml.md | Expands Solar Forecast section and updates config-root path references. |
| coverage/standalone | Adds transition commentary around addon→app terminology. |
| coverage/cases/predbat_debug_pre_saving1.yaml | Updates golden-case debug paths and notes around HA naming. |
| coverage/cases/predbat_debug_agile1.yaml | Updates golden-case debug paths and notes around HA naming. |
| CLAUDE.md | Updates project overview wording (App vs addon). |
| apps/predbat/userinterface.py | Makes save/restore notifications prefix-aware. |
| apps/predbat/tests/test_inverter.py | Updates expected auto_restart service args from addon→app. |
| apps/predbat/tests/test_hainterface_lifecycle.py | Renames comments/docstrings to “app” terminology. |
| apps/predbat/tests/test_hainterface_common.py | Renames helper arg skip_addon_check→skip_app_check. |
| apps/predbat/tests/test_hainterface_api.py | Renames tests/comments to “app check” terminology; adjusts expected slug. |
| apps/predbat/prediction_kernel.py | Comment update (addon→app image wording). |
| apps/predbat/predbat.py | Prefix-aware update notification; printable config path uses /apps_configs/<slug>. |
| apps/predbat/predbat_metrics.py | Corrects grid-power metric description sign convention. |
| apps/predbat/output.py | Prefix-aware status-change notification formatting. |
| apps/predbat/octopus.py | Comment typo fixes/clarifications. |
| apps/predbat/inverter.py | Adds app support to auto_restart service calls; prefix-aware notify messages. |
| apps/predbat/hass.py | Adds transition commentary for addon→app naming. |
| apps/predbat/ha.py | Updates comments around supervisor “app” terminology and /apps_configs mapping. |
| apps/predbat/config/apps.yaml | Updates template auto-restart example to hassio/app_restart + app:. |
| apps/predbat/build_kernel.sh | Comment wording update (addon→app). |
| apps/predbat/build_kernel_cross.sh | Comment wording update (addon→app). |
| apps/predbat/axle.py | Prefix-aware Axle VPP event notifications. |
| AGENTS.md | Updates project overview wording (App vs addon) and minor table formatting. |
Review details
- Files reviewed: 37/40 changed files
- Comments generated: 10
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ed if REST is used, use givtcp_rest_power_ignore to override
There was a problem hiding this comment.
🟡 Changes recommended
It includes concrete correctness issues (invalid entity_id typo in debug-case YAML fixtures and inconsistent config_root_p path), which should be fixed before merge.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
apps/predbat/output.py:2568
- The notification message adds an unconditional space before
extra("{message} {extra}"). Whenextrais empty this leaves a trailing space, and whenextraalready includes its own leading spacing/punctuation the message formatting becomes inconsistent. This should mirror howcurrent_statusis built (message + extra).
self.call_notify(f"{self.prefix.capitalize()} status change to: {message} {extra}")
- Files reviewed: 38/41 changed files
- Comments generated: 2
- Review effort level: Lite
| if slug: | ||
| # and use slug name to determine printable config_root pathname when writing debug info to the log file | ||
| self.config_root_p = "/addon_configs/" + slug | ||
| self.config_root_p = "/apps_configs/" + slug |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Updates Predbat notifications and docs, aiming to improve multi-instance usability (prefix-aware alerts) and clarify/expand documentation around the web interface, solar forecasting, and output data.
Minor documentation tweaks:
• Document PVAccuracy chart and Metrics view
• #3934 iboost daily reset
• Added soc_max_calculated to output_data
• Updated plan doc to include Axle in $ prefix description
• Fix sigenergy, luxpower and kostal inverter setup formatting issues
• #4607 change doc references from addon_configs to app_configs
Code changes:
• #3801 Use Predbat prefix in predbat notifications instead of hard coded
• Capitalise predbat prefix in alert notifications
• #4607 Enable either 'app' or 'addon' parameter to auto-restart predbat service call
• #4766 add warning about impact of setting best_soc_max
• #4797 correct grid power positive/negative sense in predbat_metrics.py