Skip to content

Commit

Permalink
Add sleep to map select for Roborock (home-assistant#122625)
Browse files Browse the repository at this point in the history
* Add sleep to map select

* Update homeassistant/components/roborock/select.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
  • Loading branch information
Lash-L and joostlek authored Sep 8, 2024
1 parent d4f0aaa commit 2b2f5d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions homeassistant/components/roborock/select.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Support for Roborock select."""

import asyncio
from collections.abc import Callable
from dataclasses import dataclass

Expand All @@ -13,6 +14,7 @@
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from . import RoborockConfigEntry
from .const import MAP_SLEEP
from .coordinator import RoborockDataUpdateCoordinator
from .device import RoborockCoordinatedEntityV1

Expand Down Expand Up @@ -133,6 +135,9 @@ async def async_select_option(self, option: str) -> None:
RoborockCommand.LOAD_MULTI_MAP,
[map_id],
)
# We need to wait after updating the map
# so that other commands will be executed correctly.
await asyncio.sleep(MAP_SLEEP)
break

@property
Expand Down

0 comments on commit 2b2f5d6

Please sign in to comment.