File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 122122)
123123from deebot_client .events .auto_empty import AutoEmptyEvent
124124from deebot_client .events .efficiency_mode import EfficiencyMode
125- from deebot_client .models import StaticDeviceInfo
125+ from deebot_client .models import CleanMode , StaticDeviceInfo
126+
127+
128+ def _get_clean_area_command (
129+ mode : CleanMode , area : list [int | float ], count : int = 1
130+ ) -> CleanAreaV2 :
131+ return CleanAreaV2 (
132+ CleanMode .FREE_CLEAN if mode == CleanMode .SPOT_AREA else mode ,
133+ area ,
134+ count ,
135+ )
126136
127137
128138def get_device_info () -> StaticDeviceInfo :
@@ -137,7 +147,10 @@ def get_device_info() -> StaticDeviceInfo:
137147 battery = CapabilityEvent (BatteryEvent , [GetBattery ()]),
138148 charge = CapabilityExecute (Charge ),
139149 clean = CapabilityClean (
140- action = CapabilityCleanAction (command = CleanV2 , area = CleanAreaV2 ),
150+ action = CapabilityCleanAction (
151+ command = CleanV2 ,
152+ area = _get_clean_area_command ,
153+ ),
141154 continuous = CapabilitySetEnable (
142155 ContinuousCleaningEvent ,
143156 [GetContinuousCleaning ()],
You can’t perform that action at this time.
0 commit comments