Skip to content

Document v4.2.3 duplicate-entity migration and recovery - #460

Merged
Pho3niX90 merged 9 commits into
masterfrom
chore/update-docs
Aug 7, 2026
Merged

Document v4.2.3 duplicate-entity migration and recovery#460
Pho3niX90 merged 9 commits into
masterfrom
chore/update-docs

Conversation

@Pho3niX90

@Pho3niX90 Pho3niX90 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

User description

  • chore: remove built HTML files from docs directory
  • 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.

🔄 Related Issues

Closes #[issue number] (if applicable)

✅ Testing Steps

  1. Tested With: [e.g., Solis 5G 6kW, Axitec 10kW]
  2. Test Results: [e.g., Switches update correctly, no errors]

➕ 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

flowchart LR
  issue["v4.2.0 duplicate entities"]
  migration["v4.2.3 registry migration"]
  result["Original entity IDs restored"]
  guidance["Recovery and history guidance"]
  issue -- "fixed by" --> migration
  migration -- "restores" --> result
  result -- "documented with" --> guidance
Loading

File Walkthrough

Relevant files
Configuration changes
1 files
conf.py
Enable Markdown files in Sphinx documentation                       
+4/-1     
Documentation
2 files
migration.md
Document duplicate-entity migration and recovery behavior
+49/-10 
README.md
Summarize v4.2.3 entity migration guidance                             
+11/-0   
Additional files
32 files
index.doctree [link]   
sensors.doctree [link]   
table-of-contents.doctree [link]   
toc.doctree [link]   
.buildinfo +0/-4     
index.rst.txt +0/-12   
sensors.md.txt +0/-171 
table-of-contents.rst.txt +0/-5     
toc.rst.txt +0/-5     
_sphinx_javascript_frameworks_compat.js +0/-123 
alabaster.css +0/-703 
basic.css +0/-925 
badge_only.css +0/-1     
theme.css +0/-4     
custom.css +0/-1     
doctools.js +0/-156 
documentation_options.js +0/-13   
jquery.js +0/-2     
badge_only.js +0/-1     
theme.js +0/-1     
language_data.js +0/-199 
pygments.css +0/-75   
searchtools.js +0/-574 
sphinx_highlight.js +0/-154 
genindex.html +0/-130 
index.html +0/-375 
objects.inv [link]   
search.html +0/-145 
searchindex.js +0/-1     
sensors.html +0/-1017
table-of-contents.html +0/-135 
toc.html +0/-135 

Summary by CodeRabbit

  • Documentation

    • Expanded migration guidance for v4.0 and v4.2.3, including duplicate entities, ID restoration, cleanup, history, and Energy dashboard considerations.
    • Added comprehensive sensor documentation for hybrid and string inverters, covering controls, measurements, registers, and derived entities.
    • Clarified that sensor tables are generated and improved Markdown documentation support.
  • Chores

    • Removed obsolete generated documentation assets and refreshed ignored documentation paths.

- 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.
@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Documentation and migration updates

Layer / File(s) Summary
Documentation source setup and exclusions
docs/source/conf.py, .gitignore
Sphinx now accepts .rst and .md sources. The proprietary documentation directory is ignored.
Migration guide and release notes
docs/source/migration.md, README.md
The guide and README now cover serial-based entity IDs, v4.2.3 entity-registry migration, dashboard caveats, logs, and history restoration.
Sensor documentation generation
docs/generate_sensors_md.py, docs/source/sensors.md
A generator builds sensor and control tables from integration definitions. The documentation now includes expanded hybrid and string inverter tables.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.88% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: documenting v4.2.3 duplicate-entity migration and recovery guidance.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-docs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added documentation Improvements or additions to documentation Enhancement labels Aug 3, 2026
@github-actions github-actions Bot changed the title chore: remove built HTML files from docs directory Document v4.2.3 duplicate-entity migration and recovery Aug 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ca02d6d and bc7e289.

⛔ Files ignored due to path filters (23)
  • docs/build/doctrees/environment.pickle is excluded by !**/*.pickle
  • docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff is excluded by !**/*.woff
  • docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 is excluded by !**/*.woff2
  • docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff is excluded by !**/*.woff
  • docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 is excluded by !**/*.woff2
  • docs/build/html/_static/css/fonts/fontawesome-webfont.eot is excluded by !**/*.eot
  • docs/build/html/_static/css/fonts/fontawesome-webfont.svg is excluded by !**/*.svg
  • docs/build/html/_static/css/fonts/fontawesome-webfont.ttf is excluded by !**/*.ttf
  • docs/build/html/_static/css/fonts/fontawesome-webfont.woff is excluded by !**/*.woff
  • docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 is excluded by !**/*.woff2
  • docs/build/html/_static/css/fonts/lato-bold-italic.woff is excluded by !**/*.woff
  • docs/build/html/_static/css/fonts/lato-bold-italic.woff2 is excluded by !**/*.woff2
  • docs/build/html/_static/css/fonts/lato-bold.woff is excluded by !**/*.woff
  • docs/build/html/_static/css/fonts/lato-bold.woff2 is excluded by !**/*.woff2
  • docs/build/html/_static/css/fonts/lato-normal-italic.woff is excluded by !**/*.woff
  • docs/build/html/_static/css/fonts/lato-normal-italic.woff2 is excluded by !**/*.woff2
  • docs/build/html/_static/css/fonts/lato-normal.woff is excluded by !**/*.woff
  • docs/build/html/_static/css/fonts/lato-normal.woff2 is excluded by !**/*.woff2
  • docs/build/html/_static/file.png is excluded by !**/*.png
  • docs/build/html/_static/js/html5shiv-printshiv.min.js is excluded by !**/*.min.js
  • docs/build/html/_static/js/html5shiv.min.js is excluded by !**/*.min.js
  • docs/build/html/_static/minus.png is excluded by !**/*.png
  • docs/build/html/_static/plus.png is excluded by !**/*.png
📒 Files selected for processing (36)
  • .gitignore
  • README.md
  • docs/build/doctrees/index.doctree
  • docs/build/doctrees/sensors.doctree
  • docs/build/doctrees/table-of-contents.doctree
  • docs/build/doctrees/toc.doctree
  • docs/build/html/.buildinfo
  • docs/build/html/_sources/index.rst.txt
  • docs/build/html/_sources/sensors.md.txt
  • docs/build/html/_sources/table-of-contents.rst.txt
  • docs/build/html/_sources/toc.rst.txt
  • docs/build/html/_static/_sphinx_javascript_frameworks_compat.js
  • docs/build/html/_static/alabaster.css
  • docs/build/html/_static/basic.css
  • docs/build/html/_static/css/badge_only.css
  • docs/build/html/_static/css/theme.css
  • docs/build/html/_static/custom.css
  • docs/build/html/_static/doctools.js
  • docs/build/html/_static/documentation_options.js
  • docs/build/html/_static/jquery.js
  • docs/build/html/_static/js/badge_only.js
  • docs/build/html/_static/js/theme.js
  • docs/build/html/_static/language_data.js
  • docs/build/html/_static/pygments.css
  • docs/build/html/_static/searchtools.js
  • docs/build/html/_static/sphinx_highlight.js
  • docs/build/html/genindex.html
  • docs/build/html/index.html
  • docs/build/html/objects.inv
  • docs/build/html/search.html
  • docs/build/html/searchindex.js
  • docs/build/html/sensors.html
  • docs/build/html/table-of-contents.html
  • docs/build/html/toc.html
  • docs/source/conf.py
  • docs/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

Comment thread docs/source/migration.md Outdated
Comment thread docs/source/migration.md Outdated
Comment thread docs/source/migration.md Outdated
…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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between bc7e289 and f801e4d.

📒 Files selected for processing (3)
  • .gitignore
  • docs/generate_sensors_md.py
  • docs/source/sensors.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .gitignore

Comment on lines +17 to +29
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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

Comment thread docs/generate_sensors_md.py
- 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/source/migration.md (1)

62-62: 🗄️ Data Integrity & Integration | 🔵 Trivial

Add a backup warning before history recovery.

The manual steps can remove an entity-registry entry, and HA-Merge-Sensor-History modifies 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7bc2a47 and 7be0a23.

📒 Files selected for processing (3)
  • docs/generate_sensors_md.py
  • docs/source/migration.md
  • docs/source/sensors.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/source/sensors.md
  • docs/generate_sensors_md.py

Comment thread docs/source/migration.md Outdated
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Fixes Applied Successfully

Fixed 1 file(s) based on 1 unresolved review comment.

Files modified:

  • docs/source/migration.md

Commit: 1e06ea6563679bfc9a1b3c56d173e5d072290be2

The changes have been pushed to the chore/update-docs branch.

Time taken: 3m 26s

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@Pho3niX90
Pho3niX90 merged commit bbdd1f2 into master Aug 7, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant