fix: route return-home mappings - #578
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #578 +/- ##
=======================================
Coverage 73.94% 73.94%
=======================================
Files 64 64
Lines 4724 4724
=======================================
Hits 3493 3493
Misses 1231 1231 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR fixes inconsistencies between async_return_to_base()’s "return" command value and several model-specific RETURN_HOME value tables, so model-specific payloads are actually used when dispatching return-to-base. It also updates tests to validate the public async_return_to_base() payload behavior rather than testing internal mapping tables through unreachable keys.
Changes:
- Align
RETURN_HOMEvalue mappings to use the"return"value key for T2275 and T2351, and remove the redundant"return_home"alias for T2320. - Remove T2280’s unverified
AggBreturn-home mapping while preserving its passthrough fallback behavior. - Replace direct mapping tests with
async_return_to_base()payload-level tests for T2275 and T2351.
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 |
|---|---|
| tests/test_vacuum/test_vacuum_commands.py | Adds parametrized coverage asserting model-specific return-to-base payloads are sent for T2275/T2351. |
| tests/test_vacuum/test_t2320_command_mappings.py | Removes a redundant/unreachable direct mapping test for a value key no longer used by async_return_to_base(). |
| tests/test_vacuum/test_t2275_command_mappings.py | Removes direct mapping tests that exercised a value key not used by the public return-to-base path. |
| custom_components/robovac/vacuums/T2351.py | Updates RETURN_HOME value key to "return" so it matches the integration’s return-to-base dispatch. |
| custom_components/robovac/vacuums/T2320.py | Removes redundant "return_home" alias, keeping "return" as the active mapping. |
| custom_components/robovac/vacuums/T2280.py | Drops an unverified AggB mapping and relies on passthrough "return" fallback for return-to-base. |
| custom_components/robovac/vacuums/T2275.py | Updates RETURN_HOME value key to "return" so it matches the integration’s return-to-base dispatch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@maximoei, just a heads up. I think I've picked up a slight mismatch with return/return_home here. I believe everywhere should be using return. Can you test this PR on your robovac when you get a chance please? |
Summary
Verification
Risks / follow-ups
T2280 continues to use its existing raw return fallback; this PR does not activate an unverified device payload.