Skip to content

Commit ca71450

Browse files
committed
feat(hardware): expose CleanAreaV2 capability on the 4 mower models
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.
1 parent fffb7f5 commit ca71450

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

deebot_client/hardware/300lc5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from deebot_client.commands.json.battery import GetBattery
3535
from deebot_client.commands.json.charge import Charge
3636
from deebot_client.commands.json.charge_state import GetChargeState
37-
from deebot_client.commands.json.clean import CleanV2, GetCleanInfoV2
37+
from deebot_client.commands.json.clean import CleanAreaV2, CleanV2, GetCleanInfoV2
3838
from deebot_client.commands.json.custom import CustomCommand
3939
from deebot_client.commands.json.error import GetError
4040
from deebot_client.commands.json.life_span import GetLifeSpan, ResetLifeSpan
@@ -81,7 +81,7 @@ def get_device_info() -> StaticDeviceInfo:
8181
battery=CapabilityEvent(BatteryEvent, [GetBattery()]),
8282
charge=CapabilityExecute(Charge),
8383
clean=CapabilityClean(
84-
action=CapabilityCleanAction(command=CleanV2),
84+
action=CapabilityCleanAction(command=CleanV2, area=CleanAreaV2),
8585
),
8686
custom=CapabilityCustomCommand(
8787
event=CustomCommandEvent, get=[], set=CustomCommand

deebot_client/hardware/51rcxt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from deebot_client.commands.json.battery import GetBattery
3535
from deebot_client.commands.json.charge import Charge
3636
from deebot_client.commands.json.charge_state import GetChargeState
37-
from deebot_client.commands.json.clean import CleanV2, GetCleanInfoV2
37+
from deebot_client.commands.json.clean import CleanAreaV2, CleanV2, GetCleanInfoV2
3838
from deebot_client.commands.json.custom import CustomCommand
3939
from deebot_client.commands.json.error import GetError
4040
from deebot_client.commands.json.life_span import GetLifeSpan, ResetLifeSpan
@@ -81,7 +81,7 @@ def get_device_info() -> StaticDeviceInfo:
8181
battery=CapabilityEvent(BatteryEvent, [GetBattery()]),
8282
charge=CapabilityExecute(Charge),
8383
clean=CapabilityClean(
84-
action=CapabilityCleanAction(command=CleanV2),
84+
action=CapabilityCleanAction(command=CleanV2, area=CleanAreaV2),
8585
),
8686
custom=CapabilityCustomCommand(
8787
event=CustomCommandEvent, get=[], set=CustomCommand

deebot_client/hardware/5xu9h3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from deebot_client.commands.json.battery import GetBattery
3535
from deebot_client.commands.json.charge import Charge
3636
from deebot_client.commands.json.charge_state import GetChargeState
37-
from deebot_client.commands.json.clean import CleanV2, GetCleanInfoV2
37+
from deebot_client.commands.json.clean import CleanAreaV2, CleanV2, GetCleanInfoV2
3838
from deebot_client.commands.json.custom import CustomCommand
3939
from deebot_client.commands.json.error import GetError
4040
from deebot_client.commands.json.life_span import GetLifeSpan, ResetLifeSpan
@@ -81,7 +81,7 @@ def get_device_info() -> StaticDeviceInfo:
8181
battery=CapabilityEvent(BatteryEvent, [GetBattery()]),
8282
charge=CapabilityExecute(Charge),
8383
clean=CapabilityClean(
84-
action=CapabilityCleanAction(command=CleanV2),
84+
action=CapabilityCleanAction(command=CleanV2, area=CleanAreaV2),
8585
),
8686
custom=CapabilityCustomCommand(
8787
event=CustomCommandEvent, get=[], set=CustomCommand

deebot_client/hardware/xmp9ds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from deebot_client.commands.json.battery import GetBattery
3535
from deebot_client.commands.json.charge import Charge
3636
from deebot_client.commands.json.charge_state import GetChargeState
37-
from deebot_client.commands.json.clean import CleanV2, GetCleanInfoV2
37+
from deebot_client.commands.json.clean import CleanAreaV2, CleanV2, GetCleanInfoV2
3838
from deebot_client.commands.json.custom import CustomCommand
3939
from deebot_client.commands.json.error import GetError
4040
from deebot_client.commands.json.life_span import GetLifeSpan, ResetLifeSpan
@@ -81,7 +81,7 @@ def get_device_info() -> StaticDeviceInfo:
8181
battery=CapabilityEvent(BatteryEvent, [GetBattery()]),
8282
charge=CapabilityExecute(Charge),
8383
clean=CapabilityClean(
84-
action=CapabilityCleanAction(command=CleanV2),
84+
action=CapabilityCleanAction(command=CleanV2, area=CleanAreaV2),
8585
),
8686
custom=CapabilityCustomCommand(
8787
event=CustomCommandEvent, get=[], set=CustomCommand

0 commit comments

Comments
 (0)