Skip to content

Add reported dynamic locations to skip write tracking - #1145

Merged
WillCodeForCats merged 2 commits into
mainfrom
1141-dont-track-dynamic-storage-control-writes
Oct 13, 2026
Merged

WillCodeForCats merged 2 commits into
mainfrom
1141-dont-track-dynamic-storage-control-writes

Conversation

@WillCodeForCats

@WillCodeForCats WillCodeForCats commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

@marin849 reported that command_timeout, command_mode, charge_limit, and discharge_limit behave as dynamic and don't survive an inverter reset.

Summary by CodeRabbit

  • Bug Fixes
    • Storage command timeout, command mode, charge limit, and discharge limit changes are now treated as settings that are not saved to the inverter, so they no longer count as saved writes. Existing value conversions, write targets, and entity updates remain unchanged.

@marin849 reported that command_timeout, command_mode, charge_limit, and discharge_limit behave as dynamic and don't survive an inverter reset.

Co-Authored-By: Martin <45070159+marin849@users.noreply.github.com>
@WillCodeForCats WillCodeForCats self-assigned this Oct 13, 2026
@WillCodeForCats WillCodeForCats linked an issue Oct 13, 2026 that may be closed by this pull request
3 tasks done
@WillCodeForCats WillCodeForCats added the update Update or change to something label Oct 13, 2026
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 67c43065-4133-4eb3-8fad-dc7029b52b06
📥 Commits

Reviewing files that changed from the base of the PR and between 17e3584 and b8035ec.

📒 Files selected for processing (3)
  • custom_components/solaredge_modbus_multi/components.py
  • custom_components/solaredge_modbus_multi/number.py
  • custom_components/solaredge_modbus_multi/select.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

Four storage-control writes now pass count_write=False. The StorageControl docstring documents this setting for the same controls.

Changes: Storage control writes

Layer / File(s) Summary
Document and apply write options
custom_components/solaredge_modbus_multi/components.py, custom_components/solaredge_modbus_multi/number.py, custom_components/solaredge_modbus_multi/select.py
The StorageControl docstring identifies the four controls and their count_write=False setting. The timeout, charge limit, discharge limit, and command mode write calls pass count_write=False.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 1be7a

Merge Risk: ⚪ Minimal · up to 1be7a

The four storage-control writes remain active, and their entity updates and polling continue. No actionable merge-blocking risk remains.

Security architecture risk: ⚪ Minimal · up to b8035

The four controls continue writing to the same inverter through the existing execution and retry path. Only their contribution to the flash-wear write counter and its notifications changes. No introduced security concern was identified in the reviewed paths.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed behavior is bounded to accounting for command_timeout, command_mode, charge_limit, and discharge_limit on the already selected inverter. The inspected calls introduce no new device target or write capability.

Trust Boundaries and Controls

  • observed — Caller-supplied values continue flowing through the same conversions and inverter-owned storage_control_data object. Inverter.write supplies the same inverter_unit_id to component_write. The new flag does not participate in identity selection or transport execution.

Resilience and Maintainability Implications

  • inferred — The inspected transition preserves existing failure containment: failed or interrupted device writes do not reach accounting, while retry, repeated-write behavior, write-settle cleanup, and coordinator refresh remain independent of the flag. Ambiguous device outcomes remain an existing transport uncertainty, not a newly introduced recovery path.
Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: excluding reported dynamic storage locations from write tracking.
Description check Passed The description identifies the affected fields and explains why they should skip write tracking. The repository template contains guidance rather than required sections, so the concise description is …
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files.
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
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@WillCodeForCats
WillCodeForCats merged commit 99cc045 into main Oct 13, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

update Update or change to something

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't track dynamic storage control writes

1 participant