Split WaterInfoEvent into multiple#917
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors water event handling by splitting the original WaterInfoEvent into separate events for water amount, mop attachment, and sweeping type. The changes include updating imports and replacing old event types in hardware modules and related capabilities, as well as introducing the new CapabilityWater abstraction.
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| deebot_client/hardware/deebot/*.py | Updated water event handling to use CapabilityWater and separate water_info events. |
| deebot_client/events/water_info.py | Removed the combined WaterInfoEvent and introduced separate ValueEvent types. |
| deebot_client/commands/json/water_info.py | Split aggregated water event notifications into individual events. |
| deebot_client/capabilities.py | Replaced WaterInfoEvent usage with the new CapabilityWater type. |
| Other hardware and init files | Updated corresponding imports and usage to align with the new event separation. |
Comments suppressed due to low confidence (1)
deebot_client/commands/json/water_info.py:38
- Ensure that tests are updated to verify that the split water events (WaterAmountEvent, MopAttachedEvent, and WaterSweepTypeEvent) are triggered correctly, reflecting the removal of the aggregated WaterInfoEvent.
event_bus.notify(WaterAmountEvent(WaterAmount(int(data["amount"]))));
|
LGTM, I'll try and rebase my Water commands and messages on top on this and see if it works |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## dev #917 +/- ##
=======================================
Coverage 92.46% 92.46%
=======================================
Files 121 121
Lines 4644 4648 +4
Branches 292 292
=======================================
+ Hits 4294 4298 +4
Misses 288 288
Partials 62 62 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #917 will not alter performanceComparing Summary
|
|
@edenhaus works for me, I'll open a PR as soon as this is merged |
A different approach for #905
@nanomad What do you think about this approach?