Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions roborock/data/b01_q10/b01_q10_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
from .b01_q10_code_mappings import (
B01_Q10_DP,
YXBackType,
YXCleanType,
YXDeviceCleanTask,
YXDeviceState,
YXDeviceWorkMode,
YXFanLevel,
YXWaterLevel,
)
Expand Down Expand Up @@ -103,7 +103,7 @@ class Q10Status(RoborockBase):
side_brush_life: int | None = field(default=None, metadata={"dps": B01_Q10_DP.SIDE_BRUSH_LIFE})
filter_life: int | None = field(default=None, metadata={"dps": B01_Q10_DP.FILTER_LIFE})
sensor_life: int | None = field(default=None, metadata={"dps": B01_Q10_DP.SENSOR_LIFE})
clean_mode: YXDeviceWorkMode | None = field(default=None, metadata={"dps": B01_Q10_DP.CLEAN_MODE})
clean_mode: YXCleanType | None = field(default=None, metadata={"dps": B01_Q10_DP.CLEAN_MODE})
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

clean_mode changed to YXCleanType, but existing Q10 status tests don't assert that DPS 137 is converted into the new enum type. Add/extend a test (e.g., test_status_trait_refresh, whose fixture data already includes DPS 137=1) to assert q10_api.status.clean_mode == YXCleanType.VAC_AND_MOP so regressions in enum mapping are caught.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Test updated

clean_task_type: YXDeviceCleanTask | None = field(default=None, metadata={"dps": B01_Q10_DP.CLEAN_TASK_TYPE})
back_type: YXBackType | None = field(default=None, metadata={"dps": B01_Q10_DP.BACK_TYPE})
cleaning_progress: int | None = field(default=None, metadata={"dps": B01_Q10_DP.CLEAN_PROGRESS})
Expand Down
2 changes: 2 additions & 0 deletions tests/devices/traits/b01/q10/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from roborock.data.b01_q10.b01_q10_code_mappings import (
B01_Q10_DP,
YXCleanType,
YXDeviceCleanTask,
YXDeviceState,
YXFanLevel,
Expand Down Expand Up @@ -153,6 +154,7 @@ async def test_status_trait_refresh(
assert q10_api.status.sensor_life == 0
assert q10_api.status.cleaning_progress == 100
assert q10_api.status.fault == 0
assert q10_api.status.clean_mode == YXCleanType.VAC_AND_MOP


def test_status_trait_update_listener(q10_api: Q10PropertiesApi) -> None:
Expand Down
Loading