Document v4.2.3 duplicate-entity migration and recovery - #460
Conversation
- Delete auto-generated `.buildinfo`, JavaScript, and CSS files from `docs/build/html`. - Cleanup includes `_sphinx_javascript_frameworks_compat.js`, `alabaster.css`, `basic.css`, `badge_only.css`, and `badge_only.js`. - Remove unnecessary build artifacts to maintain a clean working directory.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
📝 WalkthroughWalkthroughThe PR updates migration guidance, enables Markdown Sphinx sources, adds a sensor documentation generator, expands sensor tables, removes generated HTML assets, adds v4.2.3 release notes, and ignores proprietary documentation output. ChangesDocumentation and migration updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/source/migration.md`:
- Line 5: Update the migration documentation sentence describing Entity Unique
IDs to use the compound modifiers “Host/Port-based” and “Serial Number-based,”
preserving the rest of the wording and meaning.
- Around line 75-80: Update the migration steps around renaming the current
sensor to first rename or delete the historic sensor that still owns the old
entity_id, freeing that destination ID. Then instruct users to rename the
current sensor to the restored old entity_id, while preserving the existing
Developer Tools, Statistics, and gear-icon workflow.
- Around line 62-64: Clarify the migration guidance so Developer Tools →
Statistics is recommended only for missing or invalid long-term statistics. For
recorder history gaps or “Cannot migrate history … already in use” errors,
direct users to the manual history-restore steps or HA-Merge-Sensor-History,
noting that the latter handles both state history and long-term statistics.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ad85ba0d-cd16-4204-a492-9fd414432fdc
⛔ Files ignored due to path filters (23)
docs/build/doctrees/environment.pickleis excluded by!**/*.pickledocs/build/html/_static/css/fonts/Roboto-Slab-Bold.woffis excluded by!**/*.woffdocs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2is excluded by!**/*.woff2docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woffis excluded by!**/*.woffdocs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2is excluded by!**/*.woff2docs/build/html/_static/css/fonts/fontawesome-webfont.eotis excluded by!**/*.eotdocs/build/html/_static/css/fonts/fontawesome-webfont.svgis excluded by!**/*.svgdocs/build/html/_static/css/fonts/fontawesome-webfont.ttfis excluded by!**/*.ttfdocs/build/html/_static/css/fonts/fontawesome-webfont.woffis excluded by!**/*.woffdocs/build/html/_static/css/fonts/fontawesome-webfont.woff2is excluded by!**/*.woff2docs/build/html/_static/css/fonts/lato-bold-italic.woffis excluded by!**/*.woffdocs/build/html/_static/css/fonts/lato-bold-italic.woff2is excluded by!**/*.woff2docs/build/html/_static/css/fonts/lato-bold.woffis excluded by!**/*.woffdocs/build/html/_static/css/fonts/lato-bold.woff2is excluded by!**/*.woff2docs/build/html/_static/css/fonts/lato-normal-italic.woffis excluded by!**/*.woffdocs/build/html/_static/css/fonts/lato-normal-italic.woff2is excluded by!**/*.woff2docs/build/html/_static/css/fonts/lato-normal.woffis excluded by!**/*.woffdocs/build/html/_static/css/fonts/lato-normal.woff2is excluded by!**/*.woff2docs/build/html/_static/file.pngis excluded by!**/*.pngdocs/build/html/_static/js/html5shiv-printshiv.min.jsis excluded by!**/*.min.jsdocs/build/html/_static/js/html5shiv.min.jsis excluded by!**/*.min.jsdocs/build/html/_static/minus.pngis excluded by!**/*.pngdocs/build/html/_static/plus.pngis excluded by!**/*.png
📒 Files selected for processing (36)
.gitignoreREADME.mddocs/build/doctrees/index.doctreedocs/build/doctrees/sensors.doctreedocs/build/doctrees/table-of-contents.doctreedocs/build/doctrees/toc.doctreedocs/build/html/.buildinfodocs/build/html/_sources/index.rst.txtdocs/build/html/_sources/sensors.md.txtdocs/build/html/_sources/table-of-contents.rst.txtdocs/build/html/_sources/toc.rst.txtdocs/build/html/_static/_sphinx_javascript_frameworks_compat.jsdocs/build/html/_static/alabaster.cssdocs/build/html/_static/basic.cssdocs/build/html/_static/css/badge_only.cssdocs/build/html/_static/css/theme.cssdocs/build/html/_static/custom.cssdocs/build/html/_static/doctools.jsdocs/build/html/_static/documentation_options.jsdocs/build/html/_static/jquery.jsdocs/build/html/_static/js/badge_only.jsdocs/build/html/_static/js/theme.jsdocs/build/html/_static/language_data.jsdocs/build/html/_static/pygments.cssdocs/build/html/_static/searchtools.jsdocs/build/html/_static/sphinx_highlight.jsdocs/build/html/genindex.htmldocs/build/html/index.htmldocs/build/html/objects.invdocs/build/html/search.htmldocs/build/html/searchindex.jsdocs/build/html/sensors.htmldocs/build/html/table-of-contents.htmldocs/build/html/toc.htmldocs/source/conf.pydocs/source/migration.md
💤 Files with no reviewable changes (26)
- docs/build/html/.buildinfo
- docs/build/html/_static/pygments.css
- docs/build/html/searchindex.js
- docs/build/html/_static/sphinx_highlight.js
- docs/build/html/toc.html
- docs/build/html/_static/language_data.js
- docs/build/html/index.html
- docs/build/html/sensors.html
- docs/build/html/table-of-contents.html
- docs/build/html/_static/js/theme.js
- docs/build/html/genindex.html
- docs/build/html/_static/js/badge_only.js
- docs/build/html/_sources/table-of-contents.rst.txt
- docs/build/html/search.html
- docs/build/html/_sources/index.rst.txt
- docs/build/html/_static/documentation_options.js
- docs/build/html/_sources/toc.rst.txt
- docs/build/html/_static/css/badge_only.css
- docs/build/html/_static/alabaster.css
- docs/build/html/_sources/sensors.md.txt
- docs/build/html/_static/custom.css
- docs/build/html/_static/basic.css
- docs/build/html/_static/jquery.js
- docs/build/html/_static/searchtools.js
- docs/build/html/_static/doctools.js
- docs/build/html/_static/_sphinx_javascript_frameworks_compat.js
…r documentation - Introduce `generate_sensors_md.py` to automate `sensors.md` generation from integration files. - Update `sensors.md` with auto-generated tables for hybrid and string inverter sensors. - Preserve custom sections like "Waveshare" and "Solar Inverter Modes". - Add hybrid and string inverter register range classifications. - Extend `.gitignore` to exclude proprietary Solis docs directory. - Ensure generation integrates seamlessly with existing sensor data structures.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/generate_sensors_md.py`:
- Around line 278-281: Update the table generation around build_select_rows and
get_select_sensors so both HV and LV Battery Model option sets are rendered,
rather than only the hybrid_cfg with HV_BATTERY enabled. Use separate clearly
labeled sections or a profile column, then regenerate docs/source/sensors.md
with the revised output.
- Around line 17-29: Apply Ruff formatting to docs/generate_sensors_md.py using
uv run ruff format, then commit the resulting formatting changes so the Ruff
check passes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d394f220-92bf-4667-9de1-e9446b3505fe
📒 Files selected for processing (3)
.gitignoredocs/generate_sensors_md.pydocs/source/sensors.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .gitignore
| from custom_components.solis_modbus.data.enums import InverterFeature, InverterType # noqa: E402 | ||
| from custom_components.solis_modbus.data.solis_config import InverterConfig, InverterOptions # noqa: E402 | ||
| from custom_components.solis_modbus.sensor_data.hybrid_sensors import ( # noqa: E402 | ||
| hybrid_sensors, | ||
| hybrid_sensors_derived, | ||
| ) | ||
| from custom_components.solis_modbus.sensor_data.select_sensors import get_select_sensors # noqa: E402 | ||
| from custom_components.solis_modbus.sensor_data.string_sensors import ( # noqa: E402 | ||
| string_sensors, | ||
| string_sensors_derived, | ||
| ) | ||
| from custom_components.solis_modbus.sensor_data.switch_sensors import get_switch_sensors # noqa: E402 | ||
| from custom_components.solis_modbus.sensor_data.time_sensors import get_time_sensors # noqa: E402 |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Apply Ruff formatting.
The pipeline reports that docs/generate_sensors_md.py fails the Ruff formatting check. Run uv run ruff format docs/generate_sensors_md.py and commit the result so the required check passes.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/generate_sensors_md.py` around lines 17 - 29, Apply Ruff formatting to
docs/generate_sensors_md.py using uv run ruff format, then commit the resulting
formatting changes so the Ruff check passes.
Source: Pipeline failures
- Merge `test` and `test-and-format` workflows into a single workflow with conditional steps for `push` and `pull_request` events. - Dynamically adjust `contents` permission to `write` for `push` and `read` for `pull_request`. - Update `actions/checkout` configuration to handle branch refs and persist credentials conditionally. - Restrict auto-formatting and commit steps to `push` events only. - Ensure `ruff format --check` runs conditionally on `pull_request` events.
- Refine `migration.md` with improved guidance on restoring history and energy dashboards, including manual restore steps. - Expand sensor documentation in `sensors.md` to include LV Battery Models alongside HV Models with detailed option sets. - Update `generate_sensors_md.py` to support both HV and LV Battery Models, ensuring accurate auto-generated sensor tables. - Adjust hybrid inverter configurations to toggle between HV and LV Battery Models during generation.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/source/migration.md (1)
62-62: 🗄️ Data Integrity & Integration | 🔵 TrivialAdd a backup warning before history recovery.
The manual steps can remove an entity-registry entry, and
HA-Merge-Sensor-Historymodifies recorder data. Require a full Home Assistant backup before either recovery path.Also applies to: 81-81
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/source/migration.md` at line 62, Update the recorder history recovery guidance around the manual restore steps and HA-Merge-Sensor-History link to require users to create a full Home Assistant backup before using either option, while leaving the Developer Tools statistics guidance unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/source/migration.md`:
- Line 62: Update the manual recovery section referenced by the recorder
state-history guidance to preserve recorder history: instruct users to remove
only the stale entity-registry entry and avoid renaming the historic entry or
deleting its data. Keep Developer Tools → Statistics limited to missing or
invalid long-term statistics, and apply the same clarification to the
additionally referenced guidance.
---
Nitpick comments:
In `@docs/source/migration.md`:
- Line 62: Update the recorder history recovery guidance around the manual
restore steps and HA-Merge-Sensor-History link to require users to create a full
Home Assistant backup before using either option, while leaving the Developer
Tools statistics guidance unchanged.
🪄 Autofix
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8b9e9da0-d80b-404c-aa27-8ebe080d7eec
📒 Files selected for processing (3)
docs/generate_sensors_md.pydocs/source/migration.mddocs/source/sensors.md
🚧 Files skipped from review as they are similar to previous changes (2)
- docs/source/sensors.md
- docs/generate_sensors_md.py
Fixes Applied SuccessfullyFixed 1 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
User description
.buildinfo, JavaScript, and CSS files fromdocs/build/html._sphinx_javascript_frameworks_compat.js,alabaster.css,basic.css,badge_only.css, andbadge_only.js.🔄 Related Issues
Closes #[issue number] (if applicable)
✅ Testing Steps
➕ Additional Notes
Any extra details about the PR.
PR Type
Documentation, Enhancement
Description
Document v4.2.3 duplicate-entity migration behavior
Explain history and Energy dashboard caveats
Enable Markdown sources in Sphinx
Diagram Walkthrough
File Walkthrough
1 files
Enable Markdown files in Sphinx documentation2 files
Document duplicate-entity migration and recovery behaviorSummarize v4.2.3 entity migration guidance32 files
Summary by CodeRabbit
Documentation
Chores