Skip to content

Pooldose: add number platform#157787

Merged
joostlek merged 2 commits into
home-assistant:devfrom
lmaertin:pooldose-numbers
Dec 2, 2025
Merged

Pooldose: add number platform#157787
joostlek merged 2 commits into
home-assistant:devfrom
lmaertin:pooldose-numbers

Conversation

@lmaertin
Copy link
Copy Markdown
Contributor

@lmaertin lmaertin commented Dec 2, 2025

Breaking change

Proposed change

Add number platform:

  • pH target: Target pH value for automatic dosing control.
  • ORP target: Target ORP (Redox) value for automatic dosing control.
  • Chlorine target: Target chlorine concentration for automatic dosing control.
  • pH overfeed alarm lower limit: Lower threshold for pH overfeed detection.
  • pH overfeed alarm upper limit: Upper threshold for pH overfeed detection.
  • ORP overfeed alarm lower limit: Lower threshold for ORP overfeed detection.
  • ORP overfeed alarm upper limit: Upper threshold for ORP overfeed detection.
  • Chlorine overfeed alarm lower limit: Lower threshold for chlorine overfeed detection.
  • Chlorine overfeed alarm upper limit: Upper threshold for chlorine overfeed detection.

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 link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a number platform to the Pooldose integration, enabling users to configure target values and overfeed alarm limits for pool chemistry parameters (pH, ORP, and chlorine). The implementation provides 9 configurable number entities that control the automatic dosing system.

Key Changes

  • Added number platform with 3 target value entities and 6 overfeed alarm limit entities for pool chemistry control
  • Implemented optimistic updates for immediate UI feedback when values are changed
  • Comprehensive test coverage including snapshot tests, state changes, and unavailability scenarios

Reviewed changes

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

Show a summary per file
File Description
homeassistant/components/pooldose/init.py Added Platform.NUMBER to PLATFORMS list to register the new number platform
homeassistant/components/pooldose/number.py New implementation of number entities with coordinator-based updates and optimistic value setting
homeassistant/components/pooldose/strings.json Added translation keys for all 9 number entities (targets and alarm limits)
homeassistant/components/pooldose/icons.json Added appropriate icons for all 9 number entities
tests/components/pooldose/test_number.py Comprehensive test suite covering entity creation, availability, state changes, value setting, and attributes
tests/components/pooldose/snapshots/test_number.ambr Snapshot file containing expected entity registry and state data for all 9 number entities
tests/components/pooldose/fixtures/instantvalues.json Added fixture data for all 9 number entities with appropriate value ranges and units

Comment thread homeassistant/components/pooldose/number.py
Comment thread tests/components/pooldose/test_number.py Outdated
Comment thread tests/components/pooldose/test_number.py Outdated
Comment thread tests/components/pooldose/test_number.py Outdated
@home-assistant home-assistant Bot marked this pull request as draft December 2, 2025 22:03
@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented Dec 2, 2025

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.

- use config category in number
@lmaertin lmaertin marked this pull request as ready for review December 2, 2025 22:26
@home-assistant home-assistant Bot requested a review from joostlek December 2, 2025 22:26
@joostlek joostlek merged commit 90dc3a8 into home-assistant:dev Dec 2, 2025
36 checks passed
@lmaertin lmaertin deleted the pooldose-numbers branch December 2, 2025 22:32
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants