Skip to content

fix: route return-home mappings - #578

Open
damacus wants to merge 1 commit into
mainfrom
codex/fix-return-home-mappings
Open

fix: route return-home mappings#578
damacus wants to merge 1 commit into
mainfrom
codex/fix-return-home-mappings

Conversation

@damacus

@damacus damacus commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • align model-specific return-home value mappings with the return key used by async_return_to_base
  • activate the T2275 AggB and T2351 boolean payloads, and remove T2320’s redundant unreachable alias
  • remove T2280’s unverified dead AggB mapping without changing its existing raw return fallback
  • replace false-path direct mapper tests with public return-to-base payload coverage

Verification

  • task lint
  • task type-check
  • task test — 746 passed
  • git diff --cached --check

Risks / follow-ups

T2280 continues to use its existing raw return fallback; this PR does not activate an unverified device payload.


Open in Devin Review

Copilot AI review requested due to automatic review settings July 28, 2026 10:27

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.94%. Comparing base (5b6ead2) to head (7155b00).
⚠️ Report is 4 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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_HOME value mappings to use the "return" value key for T2275 and T2351, and remove the redundant "return_home" alias for T2320.
  • Remove T2280’s unverified AggB return-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.

@damacus

damacus commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants