mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Throttle multiple requests to the velux gateway (#72974)
This commit is contained in:
parent
a6f6f0ac5e
commit
5fe9e8cb1c
@ -17,6 +17,8 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
|||||||
|
|
||||||
from . import DATA_VELUX, VeluxEntity
|
from . import DATA_VELUX, VeluxEntity
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 1
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_platform(
|
async def async_setup_platform(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
@ -97,12 +99,11 @@ class VeluxCover(VeluxEntity, CoverEntity):
|
|||||||
|
|
||||||
async def async_set_cover_position(self, **kwargs):
|
async def async_set_cover_position(self, **kwargs):
|
||||||
"""Move the cover to a specific position."""
|
"""Move the cover to a specific position."""
|
||||||
if ATTR_POSITION in kwargs:
|
position_percent = 100 - kwargs[ATTR_POSITION]
|
||||||
position_percent = 100 - kwargs[ATTR_POSITION]
|
|
||||||
|
|
||||||
await self.node.set_position(
|
await self.node.set_position(
|
||||||
Position(position_percent=position_percent), wait_for_completion=False
|
Position(position_percent=position_percent), wait_for_completion=False
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_stop_cover(self, **kwargs):
|
async def async_stop_cover(self, **kwargs):
|
||||||
"""Stop the cover."""
|
"""Stop the cover."""
|
||||||
|
@ -10,6 +10,8 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
|||||||
|
|
||||||
from . import DATA_VELUX, VeluxEntity
|
from . import DATA_VELUX, VeluxEntity
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 1
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_platform(
|
async def async_setup_platform(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -10,6 +10,8 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
|||||||
|
|
||||||
from . import _LOGGER, DATA_VELUX
|
from . import _LOGGER, DATA_VELUX
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 1
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_platform(
|
async def async_setup_platform(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user