Skip to content

Replace async_update with async_request_refresh - #1196

Merged
WillCodeForCats merged 4 commits into
mainfrom
async-request-refresh
Nov 12, 2026
Merged

WillCodeForCats merged 4 commits into
mainfrom
async-request-refresh

Conversation

@WillCodeForCats

@WillCodeForCats WillCodeForCats commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

We originally used async_update() to ask for fresh data after a write command, but the current HA documentation says to use async_request_refresh() for this purpose. Updating the min HA requirement to 2025.11.0 since that version adds an update debouncer.

Docs: https://contributors.home-assistant.io/core/integrations/fetching-data/

Summary by CodeRabbit

  • Bug Fixes
    • Updated refresh behavior after changing power settings, storage modes, switches, or other controls. The integration now requests fresh data after these actions.
  • Documentation
    • Updated the minimum required Home Assistant version to 2025.11.0. Users on earlier versions may need to upgrade before installing this release.

@WillCodeForCats WillCodeForCats self-assigned this Nov 12, 2026
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Entity actions now request coordinator refreshes after their existing operations. The README and HACS metadata raise the minimum Home Assistant version to 2025.11.0. Tests check coordinator refresh requests for the site-limit switches.

Changes: Entity Refresh Behavior

Layer / File(s) Summary
Minimum Home Assistant version
README.md, hacs.json
The documented and declared minimum Home Assistant version changes to 2025.11.0.
Coordinator refresh after entity actions
custom_components/solaredge_modbus_multi/button.py, custom_components/solaredge_modbus_multi/number.py, custom_components/solaredge_modbus_multi/select.py, custom_components/solaredge_modbus_multi/switch.py, tests/test_entity_logic.py
Button, number, select, and switch actions request coordinator refreshes instead of calling async_update(). Tests check coordinator refresh requests for the site-limit switches.

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

Change: Refactor

Possibly related PRs

Merge Risk: Minimal · up to 07442

Write actions now request a coordinator refresh, and the minimum Home Assistant version is 2025.11.0. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Replace async_update with async_request_refresh" names the main change. The changeset replaces direct async_update() calls with async_request_refresh() across the button, number, select, an…
Description check Passed The description states the reason for the change: the current Home Assistant documentation recommends async_request_refresh() after a write command. It also explains the raised minimum Home Assistant …
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.
Full details: Title check

Explanation

The title "Replace async_update with async_request_refresh" names the main change. The changeset replaces direct async_update() calls with async_request_refresh() across the button, number, select, and switch entities, and the tests are updated to match. The title is specific and concise.

Full details: Description check

Explanation

The description states the reason for the change: the current Home Assistant documentation recommends async_request_refresh() after a write command. It also explains the raised minimum Home Assistant version (2025.11.0) and links the documentation. The template is a contributor-guidelines comment with no required section headings, and the description covers the substance of the change. It does not mention testing on real hardware, which the template emphasizes, but that is not a required section.

Finishing Touches

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2d5e2f90-beb6-4d8e-b5b9-eda408cddbe6
Commits

Reviewing files that changed from the base of the PR and between a93a6c0 and 0744268.

Files selected for processing: 5

  • README.md
  • custom_components/solaredge_modbus_multi/button.py
  • custom_components/solaredge_modbus_multi/number.py
  • custom_components/solaredge_modbus_multi/select.py
  • custom_components/solaredge_modbus_multi/switch.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.

@WillCodeForCats

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@WillCodeForCats
WillCodeForCats merged commit 0ab6569 into main Nov 12, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant