mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Add sleep to map select for Roborock (#122625)
* Add sleep to map select * Update homeassistant/components/roborock/select.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
d4f0aaa089
commit
2b2f5d6693
@ -1,5 +1,6 @@
|
||||
"""Support for Roborock select."""
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
|
||||
@ -13,6 +14,7 @@ from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from . import RoborockConfigEntry
|
||||
from .const import MAP_SLEEP
|
||||
from .coordinator import RoborockDataUpdateCoordinator
|
||||
from .device import RoborockCoordinatedEntityV1
|
||||
|
||||
@ -133,6 +135,9 @@ class RoborockCurrentMapSelectEntity(RoborockCoordinatedEntityV1, SelectEntity):
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user