Remove Aqara Pet Feeder "legacy" quirks from ZHA - #883
Conversation
Remove AqaraPetFeederErrorDetected
Remove AqaraPetFeederFeedButton
Remove AqaraPetFeederPortionWeight and AqaraPetFeederServingSize
Remove AqaraFeedingSource, AqaraPetFeederWeightDispensed, AqaraPetFeederPortionsDispensed, AqaraPetFeederLastFeedingSize, and AqaraPetFeederLastFeedingSource
Remove AqaraPetFeederChildLock and AqaraPetFeederLEDIndicator
Remove AqaraPetFeederMode and AqaraFeedingMode
Remove AqaraFeederInit
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #883 +/- ##
==========================================
- Coverage 97.19% 97.16% -0.03%
==========================================
Files 57 57
Lines 10560 10457 -103
==========================================
- Hits 10264 10161 -103
Misses 296 296 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔵 Needs a closer look
It is a cross-repo coordinated change with potential user-visible breakage if merged/released out of sync with the dependent quirks v2 migration in zha-device-handlers.
Pull request overview
Removes ZHA’s built-in (“legacy”) Aqara Pet Feeder (ACN001) platform entities and init configuration so the device is handled solely via the quirks v2 implementation in zha-device-handlers.
Changes:
- Removed legacy entity classes for the Aqara Pet Feeder across binary_sensor/button/number/select/sensor/switch platforms.
- Removed the Aqara Pet Feeder virtual init entity (
AqaraFeederInit) and its cluster attribute startup configuration. - Cleaned up now-unused
UnitOfMassimports where they were only used by the removed feeder entities.
File summaries
| File | Description |
|---|---|
| zha/application/platforms/virtual.py | Removes the Aqara Pet Feeder virtual init entity and its AQARA_OPPLE_CLUSTER attribute config. |
| zha/application/platforms/switch.py | Removes legacy feeder LED indicator and child lock switch entities. |
| zha/application/platforms/sensor/init.py | Removes legacy feeder sensors/enums and drops the related UnitOfMass import. |
| zha/application/platforms/select.py | Removes legacy feeder feeding mode enum/select entity. |
| zha/application/platforms/number/init.py | Removes legacy feeder number entities and drops the related UnitOfMass import. |
| zha/application/platforms/button/init.py | Removes the legacy feeder “Feed” button entity. |
| zha/application/platforms/binary_sensor/init.py | Removes the legacy feeder “error detected” binary sensor entity. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Fixes #705
Dependent on PR for Aqara pet feeder quirk v2: updated PR for v2 migration: zigpy/zha-device-handlers#5296
This PR removes the "legacy" quirks from ZHA for the Aqara Pet Feeder.
AqaraPetFeederErrorDetectedclassAqaraPetFeederFeedButtonclassAqaraPetFeederServingSizeandAqaraPetFeederPortionWeightclassesAqaraFeedingModeandAqaraPetFeederModeclassesAqaraFeedingSource,AqaraPetFeederLastFeedingSource,AqaraPetFeederLastFeedingSize, andAqaraPetFeederPortionsDispensedclassesAqaraPetFeederLEDIndicatorandAqaraPetFeederChildLockclassesAqaraFeederInitclassAlso removes the now unused import for
UnitOfMassin number init and sensor init.