Skip to content

Add reconfigure flow to NeoPool - #180332

Merged
zweckj merged 3 commits into
home-assistant:devfrom
svasek:neopool-reconfigure
Aug 27, 2026
Merged

Add reconfigure flow to NeoPool#180332
zweckj merged 3 commits into
home-assistant:devfrom
svasek:neopool-reconfigure

Conversation

@svasek

@svasek svasek commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Proposed change

Add a reconfigure flow to the NeoPool integration so users can update an existing entry's connection settings (host, port, unit ID, Modbus framer) without removing and re-adding it. The step probes the device and, using the _abort_if_unique_id_mismatch helper, aborts with serial_mismatch when the probed serial number does not match the entry's unique ID, guarding against pointing the entry at a different physical controller.

This completes the reconfiguration-flow rule in the integration's quality_scale.yaml. The manifest quality scale bump will follow in a separate PR once this lands.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

- Add async_step_reconfigure to update an existing entry's host, port,
  unit ID, and Modbus framer, resolved via _get_reconfigure_entry
- Reject a probed serial number that does not match the entry unique ID
  with a serial_mismatch form error
- Promote the unit_id and modbus_framer config keys to CONF_UNIT_ID and
  CONF_MODBUS_FRAMER constants now they have a second consumer
- Mark reconfiguration-flow done in quality_scale.yaml, the last todo,
  and raise the manifest quality scale from silver to platinum
- Add reconfigure config-flow tests

Copilot AI 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.

Pull request overview

Adds NeoPool connection reconfiguration and advances the integration to Platinum quality scale.

Changes:

  • Adds validated reconfiguration with device identity checks.
  • Adds translations and tests for success and failure paths.
  • Marks reconfiguration complete and raises the quality tier.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
homeassistant/components/neopool/config_flow.py Implements reconfiguration.
homeassistant/components/neopool/const.py Defines connection-setting constants.
homeassistant/components/neopool/manifest.json Sets Platinum quality.
homeassistant/components/neopool/quality_scale.yaml Marks reconfiguration complete.
homeassistant/components/neopool/strings.json Adds flow translations.
tests/components/neopool/test_config_flow.py Tests reconfiguration behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread homeassistant/components/neopool/config_flow.py Outdated
Comment thread homeassistant/components/neopool/const.py Outdated
…ments

- Prefill the reconfigure form with the submitted values on retry via
  add_suggested_values_to_schema so a probe error no longer resets input
- Remove the two section comments in const.py
Copilot AI review requested due to automatic review settings August 26, 2026 19:08

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@svasek
svasek marked this pull request as ready for review August 26, 2026 19:13

@zweckj zweckj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

split the quality scale bump into a separate PR

Comment thread homeassistant/components/neopool/config_flow.py Outdated
@home-assistant
home-assistant Bot marked this pull request as draft August 27, 2026 08:00
@home-assistant

Copy link
Copy Markdown
Contributor

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

- Set the unique ID from the reconfigure probe and reject a mismatch
  via _abort_if_unique_id_mismatch instead of a manual serial guard
- Move the serial_mismatch string from config.error to config.abort
- Keep the quality scale at silver; the platinum bump lands separately
Copilot AI review requested due to automatic review settings August 27, 2026 09:41
@svasek svasek changed the title Add reconfigure flow to NeoPool and raise quality scale to platinum Add reconfigure flow to NeoPool Aug 27, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@svasek
svasek marked this pull request as ready for review August 27, 2026 09:45
@home-assistant
home-assistant Bot requested a review from zweckj August 27, 2026 09:45
@zweckj
zweckj merged commit d1cd298 into home-assistant:dev Aug 27, 2026
35 checks passed
@svasek
svasek deleted the neopool-reconfigure branch August 27, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants