Add PARALLEL_UPDATES constant to tplink integration platforms (#135083)

This commit is contained in:
Steven B. 2025-01-08 14:11:06 +00:00 committed by GitHub
parent da29b2f711
commit 63eb27df7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 43 additions and 0 deletions

View File

@ -26,6 +26,9 @@ class TPLinkBinarySensorEntityDescription(
"""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 = (
TPLinkBinarySensorEntityDescription(
key="overheated",

View File

@ -29,6 +29,10 @@ class TPLinkButtonEntityDescription(
"""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 = [
TPLinkButtonEntityDescription(
key="test_alarm",

View File

@ -36,6 +36,10 @@ class TPLinkCameraEntityDescription(
"""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, ...] = (
TPLinkCameraEntityDescription(
key="live_view",

View File

@ -25,6 +25,10 @@ from .const import UNIT_MAPPING
from .coordinator import TPLinkDataUpdateCoordinator
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
STATE_TO_ACTION = {
ThermostatState.Idle: HVACAction.IDLE,

View File

@ -20,6 +20,10 @@ from . import TPLinkConfigEntry
from .coordinator import TPLinkDataUpdateCoordinator
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__)

View File

@ -33,6 +33,10 @@ from . import TPLinkConfigEntry, legacy_device_id
from .coordinator import TPLinkDataUpdateCoordinator
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__)
SERVICE_RANDOM_EFFECT = "random_effect"

View File

@ -34,6 +34,11 @@ class TPLinkNumberEntityDescription(
"""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 = (
TPLinkNumberEntityDescription(
key="smooth_transition_on",

View File

@ -27,6 +27,10 @@ class TPLinkSelectEntityDescription(
"""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 = [
TPLinkSelectEntityDescription(
key="light_preset",

View File

@ -30,6 +30,9 @@ class TPLinkSensorEntityDescription(
"""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, ...] = (
TPLinkSensorEntityDescription(
key="current_consumption",

View File

@ -15,6 +15,10 @@ from . import TPLinkConfigEntry
from .coordinator import TPLinkDataUpdateCoordinator
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(
hass: HomeAssistant,

View File

@ -29,6 +29,10 @@ class TPLinkSwitchEntityDescription(
"""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, ...] = (
TPLinkSwitchEntityDescription(
key="state",