mirror of
https://github.com/home-assistant/core.git
synced 2026-04-25 21:37:10 +00:00
Set PARALLEL_UPDATES for Switcher (#155227)
This commit is contained in:
@@ -24,6 +24,8 @@ from .coordinator import SwitcherDataUpdateCoordinator
|
||||
from .entity import SwitcherEntity
|
||||
from .utils import get_breeze_remote_manager
|
||||
|
||||
PARALLEL_UPDATES = 1
|
||||
|
||||
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class SwitcherThermostatButtonEntityDescription(ButtonEntityDescription):
|
||||
|
||||
@@ -37,6 +37,8 @@ from .coordinator import SwitcherDataUpdateCoordinator
|
||||
from .entity import SwitcherEntity
|
||||
from .utils import get_breeze_remote_manager
|
||||
|
||||
PARALLEL_UPDATES = 1
|
||||
|
||||
API_CONTROL_BREEZE_DEVICE = "control_breeze_device"
|
||||
|
||||
DEVICE_MODE_TO_HA = {
|
||||
|
||||
@@ -21,7 +21,9 @@ from .const import SIGNAL_DEVICE_ADD
|
||||
from .coordinator import SwitcherDataUpdateCoordinator
|
||||
from .entity import SwitcherEntity
|
||||
|
||||
API_SET_POSITON = "set_position"
|
||||
PARALLEL_UPDATES = 1
|
||||
|
||||
API_SET_POSITION = "set_position"
|
||||
API_STOP = "stop_shutter"
|
||||
|
||||
|
||||
@@ -83,16 +85,16 @@ class SwitcherBaseCoverEntity(SwitcherEntity, CoverEntity):
|
||||
|
||||
async def async_close_cover(self, **kwargs: Any) -> None:
|
||||
"""Close cover."""
|
||||
await self._async_call_api(API_SET_POSITON, 0, self._cover_id)
|
||||
await self._async_call_api(API_SET_POSITION, 0, self._cover_id)
|
||||
|
||||
async def async_open_cover(self, **kwargs: Any) -> None:
|
||||
"""Open cover."""
|
||||
await self._async_call_api(API_SET_POSITON, 100, self._cover_id)
|
||||
await self._async_call_api(API_SET_POSITION, 100, self._cover_id)
|
||||
|
||||
async def async_set_cover_position(self, **kwargs: Any) -> None:
|
||||
"""Move the cover to a specific position."""
|
||||
await self._async_call_api(
|
||||
API_SET_POSITON, kwargs[ATTR_POSITION], self._cover_id
|
||||
API_SET_POSITION, kwargs[ATTR_POSITION], self._cover_id
|
||||
)
|
||||
|
||||
async def async_stop_cover(self, **kwargs: Any) -> None:
|
||||
|
||||
@@ -16,6 +16,8 @@ from .const import SIGNAL_DEVICE_ADD
|
||||
from .coordinator import SwitcherDataUpdateCoordinator
|
||||
from .entity import SwitcherEntity
|
||||
|
||||
PARALLEL_UPDATES = 1
|
||||
|
||||
API_SET_LIGHT = "set_light"
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ rules:
|
||||
entity-unavailable: done
|
||||
integration-owner: done
|
||||
log-when-unavailable: done
|
||||
parallel-updates: todo
|
||||
parallel-updates: done
|
||||
reauthentication-flow: done
|
||||
test-coverage: done
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ from .const import SIGNAL_DEVICE_ADD
|
||||
from .coordinator import SwitcherDataUpdateCoordinator
|
||||
from .entity import SwitcherEntity
|
||||
|
||||
PARALLEL_UPDATES = 0
|
||||
|
||||
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class SwitcherSensorEntityDescription(SensorEntityDescription):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from typing import Any, cast
|
||||
|
||||
from aioswitcher.api import Command
|
||||
@@ -34,7 +33,7 @@ from .const import (
|
||||
from .coordinator import SwitcherDataUpdateCoordinator
|
||||
from .entity import SwitcherEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
PARALLEL_UPDATES = 1
|
||||
|
||||
API_CONTROL_DEVICE = "control_device"
|
||||
API_SET_AUTO_SHUTDOWN = "set_auto_shutdown"
|
||||
|
||||
Reference in New Issue
Block a user