mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +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."""
|
"""Support for Roborock select."""
|
||||||
|
|
||||||
|
import asyncio
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ from homeassistant.core import HomeAssistant
|
|||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import RoborockConfigEntry
|
from . import RoborockConfigEntry
|
||||||
|
from .const import MAP_SLEEP
|
||||||
from .coordinator import RoborockDataUpdateCoordinator
|
from .coordinator import RoborockDataUpdateCoordinator
|
||||||
from .device import RoborockCoordinatedEntityV1
|
from .device import RoborockCoordinatedEntityV1
|
||||||
|
|
||||||
@ -133,6 +135,9 @@ class RoborockCurrentMapSelectEntity(RoborockCoordinatedEntityV1, SelectEntity):
|
|||||||
RoborockCommand.LOAD_MULTI_MAP,
|
RoborockCommand.LOAD_MULTI_MAP,
|
||||||
[map_id],
|
[map_id],
|
||||||
)
|
)
|
||||||
|
# We need to wait after updating the map
|
||||||
|
# so that other commands will be executed correctly.
|
||||||
|
await asyncio.sleep(MAP_SLEEP)
|
||||||
break
|
break
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user