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:
Luke Lashley 2024-09-08 07:56:42 -04:00 committed by GitHub
parent d4f0aaa089
commit 2b2f5d6693
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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