Skip to content
Draft
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
19 changes: 15 additions & 4 deletions homeassistant/components/roborock/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,21 @@ async def _async_update_data(self) -> DeviceState:
# since the last map update, you can update the map.
new_status = self.properties_api.status
if (
new_status.in_cleaning
and (dt_util.utcnow() - self._last_home_update_attempt)
> IMAGE_CACHE_INTERVAL
) or self.last_update_state != new_status.state_name:
(
new_status.in_cleaning
and (dt_util.utcnow() - self._last_home_update_attempt)
> IMAGE_CACHE_INTERVAL
)
or self.last_update_state != new_status.state_name
or (
Copy link
Contributor

@allenporter allenporter Dec 7, 2025

Choose a reason for hiding this comment

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

I worry this will make it run faster than IMAGE_CACHE_INTERVAL when map is None (e.g. if its broken and stuck as None)

Copy link
Contributor Author

@Lash-L Lash-L Dec 7, 2025

Choose a reason for hiding this comment

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

Ah great call it should probably move up with that other if that includes the time interval check

self.properties_api.maps.current_map
and self.properties_api.home.home_map_content
and self.properties_api.home.home_map_content.get(
self.properties_api.maps.current_map
)
is None
)
):
self._last_home_update_attempt = dt_util.utcnow()
try:
await self.update_map()
Expand Down
Loading