mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Add PARALLEL_UPDATES constant to tplink integration platforms (#135083)
This commit is contained in:
parent
da29b2f711
commit
63eb27df7b
@ -26,6 +26,9 @@ class TPLinkBinarySensorEntityDescription(
|
|||||||
"""Base class for a TPLink feature based sensor entity description."""
|
"""Base class for a TPLink feature based sensor entity description."""
|
||||||
|
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
BINARY_SENSOR_DESCRIPTIONS: Final = (
|
BINARY_SENSOR_DESCRIPTIONS: Final = (
|
||||||
TPLinkBinarySensorEntityDescription(
|
TPLinkBinarySensorEntityDescription(
|
||||||
key="overheated",
|
key="overheated",
|
||||||
|
@ -29,6 +29,10 @@ class TPLinkButtonEntityDescription(
|
|||||||
"""Base class for a TPLink feature based button entity description."""
|
"""Base class for a TPLink feature based button entity description."""
|
||||||
|
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
# For actions the integration handles locking of concurrent device request
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
BUTTON_DESCRIPTIONS: Final = [
|
BUTTON_DESCRIPTIONS: Final = [
|
||||||
TPLinkButtonEntityDescription(
|
TPLinkButtonEntityDescription(
|
||||||
key="test_alarm",
|
key="test_alarm",
|
||||||
|
@ -36,6 +36,10 @@ class TPLinkCameraEntityDescription(
|
|||||||
"""Base class for camera entity description."""
|
"""Base class for camera entity description."""
|
||||||
|
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
# For actions the integration handles locking of concurrent device request
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
CAMERA_DESCRIPTIONS: tuple[TPLinkCameraEntityDescription, ...] = (
|
CAMERA_DESCRIPTIONS: tuple[TPLinkCameraEntityDescription, ...] = (
|
||||||
TPLinkCameraEntityDescription(
|
TPLinkCameraEntityDescription(
|
||||||
key="live_view",
|
key="live_view",
|
||||||
|
@ -25,6 +25,10 @@ from .const import UNIT_MAPPING
|
|||||||
from .coordinator import TPLinkDataUpdateCoordinator
|
from .coordinator import TPLinkDataUpdateCoordinator
|
||||||
from .entity import CoordinatedTPLinkEntity, async_refresh_after
|
from .entity import CoordinatedTPLinkEntity, async_refresh_after
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
# For actions the integration handles locking of concurrent device request
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
# Upstream state to HVACAction
|
# Upstream state to HVACAction
|
||||||
STATE_TO_ACTION = {
|
STATE_TO_ACTION = {
|
||||||
ThermostatState.Idle: HVACAction.IDLE,
|
ThermostatState.Idle: HVACAction.IDLE,
|
||||||
|
@ -20,6 +20,10 @@ from . import TPLinkConfigEntry
|
|||||||
from .coordinator import TPLinkDataUpdateCoordinator
|
from .coordinator import TPLinkDataUpdateCoordinator
|
||||||
from .entity import CoordinatedTPLinkEntity, async_refresh_after
|
from .entity import CoordinatedTPLinkEntity, async_refresh_after
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
# For actions the integration handles locking of concurrent device request
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,6 +33,10 @@ from . import TPLinkConfigEntry, legacy_device_id
|
|||||||
from .coordinator import TPLinkDataUpdateCoordinator
|
from .coordinator import TPLinkDataUpdateCoordinator
|
||||||
from .entity import CoordinatedTPLinkEntity, async_refresh_after
|
from .entity import CoordinatedTPLinkEntity, async_refresh_after
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
# For actions the integration handles locking of concurrent device request
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
SERVICE_RANDOM_EFFECT = "random_effect"
|
SERVICE_RANDOM_EFFECT = "random_effect"
|
||||||
|
@ -34,6 +34,11 @@ class TPLinkNumberEntityDescription(
|
|||||||
"""Base class for a TPLink feature based sensor entity description."""
|
"""Base class for a TPLink feature based sensor entity description."""
|
||||||
|
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
# For actions the integration handles locking of concurrent device request
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
NUMBER_DESCRIPTIONS: Final = (
|
NUMBER_DESCRIPTIONS: Final = (
|
||||||
TPLinkNumberEntityDescription(
|
TPLinkNumberEntityDescription(
|
||||||
key="smooth_transition_on",
|
key="smooth_transition_on",
|
||||||
|
@ -27,6 +27,10 @@ class TPLinkSelectEntityDescription(
|
|||||||
"""Base class for a TPLink feature based sensor entity description."""
|
"""Base class for a TPLink feature based sensor entity description."""
|
||||||
|
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
# For actions the integration handles locking of concurrent device request
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
SELECT_DESCRIPTIONS: Final = [
|
SELECT_DESCRIPTIONS: Final = [
|
||||||
TPLinkSelectEntityDescription(
|
TPLinkSelectEntityDescription(
|
||||||
key="light_preset",
|
key="light_preset",
|
||||||
|
@ -30,6 +30,9 @@ class TPLinkSensorEntityDescription(
|
|||||||
"""Base class for a TPLink feature based sensor entity description."""
|
"""Base class for a TPLink feature based sensor entity description."""
|
||||||
|
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
||||||
TPLinkSensorEntityDescription(
|
TPLinkSensorEntityDescription(
|
||||||
key="current_consumption",
|
key="current_consumption",
|
||||||
|
@ -15,6 +15,10 @@ from . import TPLinkConfigEntry
|
|||||||
from .coordinator import TPLinkDataUpdateCoordinator
|
from .coordinator import TPLinkDataUpdateCoordinator
|
||||||
from .entity import CoordinatedTPLinkEntity, async_refresh_after
|
from .entity import CoordinatedTPLinkEntity, async_refresh_after
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
# For actions the integration handles locking of concurrent device request
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -29,6 +29,10 @@ class TPLinkSwitchEntityDescription(
|
|||||||
"""Base class for a TPLink feature based sensor entity description."""
|
"""Base class for a TPLink feature based sensor entity description."""
|
||||||
|
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
# For actions the integration handles locking of concurrent device request
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
SWITCH_DESCRIPTIONS: tuple[TPLinkSwitchEntityDescription, ...] = (
|
SWITCH_DESCRIPTIONS: tuple[TPLinkSwitchEntityDescription, ...] = (
|
||||||
TPLinkSwitchEntityDescription(
|
TPLinkSwitchEntityDescription(
|
||||||
key="state",
|
key="state",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user