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
2 changes: 1 addition & 1 deletion roborock/devices/traits/v1/clean_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def refresh(self) -> None:
_LOGGER.debug("No clean records available in clean summary.")
self.last_clean_record = None
return
last_record_id = self.records[-1]
last_record_id = self.records[0]
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

The corresponding test in tests/devices/traits/v1/test_clean_summary.py needs to be updated to match this fix. Line 96 of the test expects the call to be made with params=[1734458038] (the last element in the records list), but with this change it should now expect params=[1756848207] (the first element). Additionally, the test data in CLEAN_RECORD_DATA should be updated to have a begin value that matches the first record ID (1756848207) instead of the current inconsistent value (1738864366).

Copilot uses AI. Check for mistakes.
self.last_clean_record = await self.get_clean_record(last_record_id)

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion tests/devices/traits/v1/test_clean_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def test_get_clean_summary_success(

# Verify the RPC call was made correctly
mock_rpc_channel.send_command.assert_has_calls(
[call(RoborockCommand.GET_CLEAN_SUMMARY), call(RoborockCommand.GET_CLEAN_RECORD, params=[1734458038])]
[call(RoborockCommand.GET_CLEAN_SUMMARY), call(RoborockCommand.GET_CLEAN_RECORD, params=[1756848207])]
)


Expand Down