Throttle multiple requests to the velux gateway (#72974)
This commit is contained in:
parent
a6f6f0ac5e
commit
5fe9e8cb1c
3 changed files with 10 additions and 5 deletions
|
@ -17,6 +17,8 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
|||
|
||||
from . import DATA_VELUX, VeluxEntity
|
||||
|
||||
PARALLEL_UPDATES = 1
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
|
@ -97,12 +99,11 @@ class VeluxCover(VeluxEntity, CoverEntity):
|
|||
|
||||
async def async_set_cover_position(self, **kwargs):
|
||||
"""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(
|
||||
Position(position_percent=position_percent), wait_for_completion=False
|
||||
)
|
||||
await self.node.set_position(
|
||||
Position(position_percent=position_percent), wait_for_completion=False
|
||||
)
|
||||
|
||||
async def async_stop_cover(self, **kwargs):
|
||||
"""Stop the cover."""
|
||||
|
|
|
@ -10,6 +10,8 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
|||
|
||||
from . import DATA_VELUX, VeluxEntity
|
||||
|
||||
PARALLEL_UPDATES = 1
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
|
|
|
@ -10,6 +10,8 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
|||
|
||||
from . import _LOGGER, DATA_VELUX
|
||||
|
||||
PARALLEL_UPDATES = 1
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
|
|
Loading…
Add table
Reference in a new issue