Skip to content

Commit f129603

Browse files
authored
fix: use correct index for clean records (#620)
1 parent e69d090 commit f129603

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

roborock/devices/traits/v1/clean_summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async def refresh(self) -> None:
2424
_LOGGER.debug("No clean records available in clean summary.")
2525
self.last_clean_record = None
2626
return
27-
last_record_id = self.records[-1]
27+
last_record_id = self.records[0]
2828
self.last_clean_record = await self.get_clean_record(last_record_id)
2929

3030
@classmethod

tests/devices/traits/v1/test_clean_summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def test_get_clean_summary_success(
9393

9494
# Verify the RPC call was made correctly
9595
mock_rpc_channel.send_command.assert_has_calls(
96-
[call(RoborockCommand.GET_CLEAN_SUMMARY), call(RoborockCommand.GET_CLEAN_RECORD, params=[1734458038])]
96+
[call(RoborockCommand.GET_CLEAN_SUMMARY), call(RoborockCommand.GET_CLEAN_RECORD, params=[1756848207])]
9797
)
9898

9999

0 commit comments

Comments
 (0)