Skip to content

Bump letpot to 0.7.0#169868

Merged
joostlek merged 6 commits into
home-assistant:devfrom
jpelgrom:letpot-0.7.0
May 10, 2026
Merged

Bump letpot to 0.7.0#169868
joostlek merged 6 commits into
home-assistant:devfrom
jpelgrom:letpot-0.7.0

Conversation

@jpelgrom
Copy link
Copy Markdown
Member

@jpelgrom jpelgrom commented May 5, 2026

Proposed change

Bump letpot to 0.7.0:

This version introduces support for an entirely new category of devices: watering systems/drip irrigation. I've made the necessary changes to the integration to keep it working and not introduce new features yet:

  • Updated the integration setup to only create coordinators for hydroponic gardens (= previously the only supported device category)
  • Adjust typing where necessary, making it generic to be able to support watering systems in the future (this is heavily inspired by how the eheimdigital integration handles this)

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

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:

Copilot AI review requested due to automatic review settings May 5, 2026 19:18
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 updates the LetPot integration to work with python-letpot v0.7.0, which introduces additional device categories (e.g., watering systems), while keeping Home Assistant’s integration behavior scoped to hydroponic gardens for now.

Changes:

  • Bump letpot dependency to 0.7.0 across the manifest and requirements files.
  • Adjust integration setup/runtime data to only create coordinators for garden devices (and keep room for watering systems later).
  • Refactor entity/coordinator typing to be more generic in preparation for multi-device-category support.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
homeassistant/components/letpot/manifest.json Bumps integration dependency to letpot==0.7.0.
requirements_all.txt Updates global pinned dependency for letpot to 0.7.0.
requirements_test_all.txt Updates test pinned dependency for letpot to 0.7.0.
homeassistant/components/letpot/__init__.py Filters setup to garden devices only and stores coordinators in a new runtime-data container.
homeassistant/components/letpot/coordinator.py Introduces coordinator container dataclass and generic coordinator base, plus garden/watering coordinator types.
homeassistant/components/letpot/entity.py Makes the base entity generic over status type to support multiple device categories.
homeassistant/components/letpot/binary_sensor.py Switches platform setup to coordinators.gardens and introduces generic entity/description typing.
homeassistant/components/letpot/sensor.py Switches platform setup to coordinators.gardens and introduces generic entity/description typing.
homeassistant/components/letpot/number.py Switches platform setup to coordinators.gardens and introduces generic entity/description typing.
homeassistant/components/letpot/select.py Switches platform setup to coordinators.gardens and introduces generic entity/description typing.
homeassistant/components/letpot/switch.py Switches platform setup to coordinators.gardens and introduces generic entity/description typing.
homeassistant/components/letpot/time.py Switches platform setup to coordinators.gardens and introduces generic entity/description typing.
tests/components/letpot/__init__.py Updates test fixtures to use the new garden-status model type.

Comment thread homeassistant/components/letpot/binary_sensor.py
Comment thread homeassistant/components/letpot/sensor.py
Comment thread homeassistant/components/letpot/switch.py
Comment thread homeassistant/components/letpot/number.py
Comment thread homeassistant/components/letpot/coordinator.py Outdated
Comment on lines +26 to +28
class LetPotEntity[_DataT: LetPotDeviceStatus](
CoordinatorEntity[LetPotDeviceCoordinator[_DataT]]
):
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not sure how to address this. Changing the exception handler to use LetPotEntity[LetPotDeviceStatus] will create new mypy errors because the individual entities use a subclass of the status model. Changing the exception handler to use LetPotEntity[Any] works but that still results in losing type safety. The type isn't used in the exception handler so Any might be fine if there's no alternative.

Comment thread homeassistant/components/letpot/select.py
Comment thread homeassistant/components/letpot/time.py
Copy link
Copy Markdown
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

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

Can we split the new coordinator from the dependency bump?

@home-assistant home-assistant Bot marked this pull request as draft May 5, 2026 19:36
@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented May 5, 2026

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.

@jpelgrom
Copy link
Copy Markdown
Member Author

jpelgrom commented May 5, 2026

Can we split the new coordinator from the dependency bump?

What do you mean with new coordinator?

The actual coordinator hasn't changed, only typing. LetPotGardenCoordinator is a very small description to make things nice but isn't really doing anything other than documenting and could theoretically be replaced by LetPotDeviceCoordinator[LetPotGardenStatus].

Copilot AI review requested due to automatic review settings May 5, 2026 20:12
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jpelgrom
Copy link
Copy Markdown
Member Author

jpelgrom commented May 5, 2026

Test failure appears to be unrelated (timeout installing OS dependencies).

@jpelgrom jpelgrom marked this pull request as ready for review May 8, 2026 16:10
@home-assistant home-assistant Bot requested a review from joostlek May 8, 2026 16:10
@erwindouna
Copy link
Copy Markdown
Member

What do you mean with new coordinator?

The actual coordinator hasn't changed, only typing. LetPotGardenCoordinator is a very small description to make things nice but isn't really doing anything other than documenting and could theoretically be replaced by LetPotDeviceCoordinator[LetPotGardenStatus].

What Joost is referring to is that you split out a dependency bump, with other changes you're making. Dependency bump require their own scope and focus to check what has changed upstream.
So I believe the feedback of Joost still stands when I scan the code, the change not related to bumping the dependency can/should be moved over to its own dedicated PR, please. :)

It relates to the development cycle Core prefers.

@erwindouna erwindouna marked this pull request as draft May 8, 2026 19:36
@erwindouna erwindouna marked this pull request as draft May 8, 2026 19:36
Comment thread homeassistant/components/letpot/manifest.json
@jpelgrom jpelgrom marked this pull request as ready for review May 9, 2026 10:51
Copilot AI review requested due to automatic review settings May 9, 2026 10:51
@home-assistant home-assistant Bot requested a review from erwindouna May 9, 2026 10:51
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

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

Comment thread homeassistant/components/letpot/binary_sensor.py Outdated
Comment thread homeassistant/components/letpot/switch.py Outdated
Comment thread homeassistant/components/letpot/sensor.py Outdated
Comment thread homeassistant/components/letpot/select.py Outdated
Comment thread homeassistant/components/letpot/number.py Outdated
Copilot AI review requested due to automatic review settings May 9, 2026 11:20
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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/letpot/entity.py
@jpelgrom
Copy link
Copy Markdown
Member Author

jpelgrom commented May 9, 2026

Test failure again appears to be unrelated (not a test from this integration).

Copy link
Copy Markdown
Member

@erwindouna erwindouna left a comment

Choose a reason for hiding this comment

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

Looks good to ke, thanks @jpelgrom!

@erwindouna
Copy link
Copy Markdown
Member

Test failures seems unrelated.

@joostlek joostlek merged commit b2dad41 into home-assistant:dev May 10, 2026
45 of 48 checks passed
@jpelgrom jpelgrom deleted the letpot-0.7.0 branch May 10, 2026 09:48
@github-actions github-actions Bot locked and limited conversation to collaborators May 11, 2026
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.

4 participants