Skip to content

Commit c29c38f

Browse files
committed
chore: address comments from copilot
1 parent 35e7354 commit c29c38f

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

roborock/data/v1/v1_clean_modes.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,12 @@ def get_current_cleaning_mode(
253253
return CleaningModes.SMART_MODE
254254
if is_mode_customized(clean_mode, water_mode, mop_mode):
255255
return CleaningModes.CUSTOM
256-
try:
257-
if clean_mode == get_mop_only_vacuum_mode(features).code:
258-
return CleaningModes.MOP
259-
except RoborockUnsupportedFeature:
260-
pass
256+
if water_mode != WaterModes.OFF.code:
257+
try:
258+
if clean_mode == get_mop_only_vacuum_mode(features).code:
259+
return CleaningModes.MOP
260+
except RoborockUnsupportedFeature:
261+
pass
261262
if water_mode == WaterModes.OFF.code:
262263
return CleaningModes.VACUUM
263264
return CleaningModes.VAC_AND_MOP

tests/devices/traits/v1/test_status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def _create_cleaning_mode_status_trait(**feature_overrides: bool) -> StatusTrait
3939
features.is_support_water_mode = True
4040
features.is_pure_clean_mop_supported = True
4141
features.is_customized_clean_supported = True
42+
features.is_clean_route_setting_supported = True
4243
for feature_name, value in feature_overrides.items():
4344
setattr(features, feature_name, value)
4445
return StatusTrait(cast(DeviceFeaturesTrait, features), region="us")

0 commit comments

Comments
 (0)