Refresh coordinator after map sleep for Roborock (#141093)

Refresh coordinator after the map sleep
This commit is contained in:
Luke Lashley 2025-03-22 12:01:57 -04:00 committed by GitHub
parent b2942d61b3
commit fc0dbcd600
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,8 +149,9 @@ class RoborockCurrentMapSelectEntity(RoborockCoordinatedEntityV1, SelectEntity):
"""Set the option."""
for map_id, map_ in self.coordinator.maps.items():
if map_.name == option:
await self.send(
await self._send_command(
RoborockCommand.LOAD_MULTI_MAP,
self.api,
[map_id],
)
# Update the current map id manually so that nothing gets broken
@ -159,6 +160,7 @@ class RoborockCurrentMapSelectEntity(RoborockCoordinatedEntityV1, SelectEntity):
# We need to wait after updating the map
# so that other commands will be executed correctly.
await asyncio.sleep(MAP_SLEEP)
await self.coordinator.async_refresh()
break
@property