Bump letpot to 0.7.0#169868
Conversation
There was a problem hiding this comment.
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
letpotdependency to0.7.0across 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. |
| class LetPotEntity[_DataT: LetPotDeviceStatus]( | ||
| CoordinatorEntity[LetPotDeviceCoordinator[_DataT]] | ||
| ): |
There was a problem hiding this comment.
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.
joostlek
left a comment
There was a problem hiding this comment.
Can we split the new coordinator from the dependency bump?
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
What do you mean with new coordinator? The actual coordinator hasn't changed, only typing. |
|
Test failure appears to be unrelated (timeout installing OS dependencies). |
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:
eheimdigitalintegration handles this)Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: