Skip to content

feat(hardware): expose CleanAreaV2 on the 4 mower models#1596

Open
Beennnn wants to merge 1 commit into
DeebotUniverse:devfrom
Beennnn:feat/cleanarea-v2-mowers
Open

feat(hardware): expose CleanAreaV2 on the 4 mower models#1596
Beennnn wants to merge 1 commit into
DeebotUniverse:devfrom
Beennnn:feat/cleanarea-v2-mowers

Conversation

@Beennnn
Copy link
Copy Markdown
Contributor

@Beennnn Beennnn commented May 14, 2026

Summary

Adds area=CleanAreaV2 to CapabilityCleanAction for the 4 mower hardware models — xmp9ds (GOAT A1600 RTK), 5xu9h3 (GOAT G1), 51rcxt (GOAT A3000 LiDAR Pro), 300lc5 (GOAT O500 Panorama).

Before this change the mower CapabilityCleanAction had only command=CleanV2 and consumers could not launch a specific zone — they had to fall back to the full-map action.

Why

Mowers accept the exact same clean_V2 payload shape as vacuums for spot-area cleaning:

{"act":"s","content":{"type":"spotArea","value":"<zone_id>"}}

Verified on a real GOAT A1600 (FW 1.15.13) by MQTT sniff while the official app launched zone "Trampo":

  • The mower's getCleanInfo response reported cleanState.content = {"type":"spotArea","value":"1"} confirming the same envelope as the existing vacuum CleanAreaV2 implementation produces.
  • The complementary getAreaSet type:"ar" exposes the named zones with stable numeric IDs (LZMA+base64 encoded in subsets), giving consumers a name → id lookup table at runtime.

So the lib already had the right command (CleanAreaV2) — only the hardware capability declarations needed updating.

What changed

  • deebot_client/hardware/xmp9ds.py
  • deebot_client/hardware/5xu9h3.py
  • deebot_client/hardware/51rcxt.py
  • deebot_client/hardware/300lc5.py

Each file gets CleanAreaV2 added to the from deebot_client.commands.json.clean import … and area=CleanAreaV2 attached to the existing CapabilityCleanAction(command=CleanV2, …).

8 lines changed total (4 imports + 4 area parameters).

Tests

  • pytest tests/hardware/ → 7 passed
  • pytest tests/commands/json/test_clean.py → 27 passed
  • The CleanAreaV2 class itself is already covered by the vacuum-side suite; this PR just wires its existing behavior to the mower capability so no new test logic is needed for the command itself.

Notes

🤖 Generated with Claude Code

Adds `area=CleanAreaV2` to `CapabilityCleanAction` for the GOAT family
(xmp9ds A1600 RTK, 5xu9h3 G1, 51rcxt A3000 LiDAR Pro, 300lc5 O500
Panorama). The mowers already accept the same `clean_V2` payload with
`{"act":"s","content":{"type":"spotArea","value":"<zone_id>"}}` — verified
via MQTT sniff on a real A1600 (Trampo zone id=1 confirmed).

Consumers (e.g. home-assistant/core) can now invoke
`device.capabilities.clean.action.area(CleanMode.SPOT_AREA, [zone_id], 1)`
to launch a specific zone on a mower without falling back to the
`Map complete` action.

`getAreaSet type:"ar"` returns the zone definitions (LZMA+base64
encoded) with stable numeric IDs that map to the named zones in the
Ecovacs app, enabling clients to build a zone-name → id lookup at
runtime.

The `CleanAreaV2` API itself is unchanged — this is a pure capability
exposure on hardware definitions.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.99%. Comparing base (8980d8c) to head (7ab01f7).
⚠️ Report is 16 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1596      +/-   ##
==========================================
+ Coverage   94.92%   94.99%   +0.07%     
==========================================
  Files         156      158       +2     
  Lines        6105     6199      +94     
  Branches      350      353       +3     
==========================================
+ Hits         5795     5889      +94     
  Misses        248      248              
  Partials       62       62              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 14, 2026

Merging this PR will not alter performance

✅ 113 untouched benchmarks


Comparing Beennnn:feat/cleanarea-v2-mowers (7ab01f7) with dev (f87b6c9)

Open in CodSpeed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant