Add PARALLEL_UPDATES constant to ring integration platforms (#136470)

This commit is contained in:
Steven B. 2025-01-24 19:48:55 +00:00 committed by GitHub
parent b0188772bc
commit 1697e24068
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 32 additions and 0 deletions

View File

@ -30,6 +30,9 @@ from .entity import (
async_check_create_deprecated,
)
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
@dataclass(frozen=True, kw_only=True)
class RingBinarySensorEntityDescription(

View File

@ -12,6 +12,10 @@ from . import RingConfigEntry
from .coordinator import RingDataCoordinator
from .entity import RingEntity, exception_wrap
# Coordinator is used to centralize the data updates
# Actions restricted to 1 at a time
PARALLEL_UPDATES = 1
BUTTON_DESCRIPTION = ButtonEntityDescription(
key="open_door", translation_key="open_door"
)

View File

@ -34,6 +34,10 @@ from . import RingConfigEntry
from .coordinator import RingDataCoordinator
from .entity import RingDeviceT, RingEntity, exception_wrap
# Coordinator is used to centralize the data updates
# Actions restricted to 1 at a time
PARALLEL_UPDATES = 1
FORCE_REFRESH_INTERVAL = timedelta(minutes=3)
MOTION_DETECTION_CAPABILITY = "motion_detection"

View File

@ -18,6 +18,9 @@ from . import RingConfigEntry
from .coordinator import RingListenCoordinator
from .entity import RingBaseEntity, RingDeviceT
# Event entity does not perform updates or actions.
PARALLEL_UPDATES = 0
@dataclass(frozen=True, kw_only=True)
class RingEventEntityDescription(EventEntityDescription, Generic[RingDeviceT]):

View File

@ -18,6 +18,9 @@ from .entity import RingEntity, exception_wrap
_LOGGER = logging.getLogger(__name__)
# Coordinator is used to centralize the data updates
# Actions restricted to 1 at a time
PARALLEL_UPDATES = 1
# It takes a few seconds for the API to correctly return an update indicating
# that the changes have been made. Once we request a change (i.e. a light

View File

@ -20,6 +20,10 @@ from . import RingConfigEntry
from .coordinator import RingDataCoordinator
from .entity import RingDeviceT, RingEntity, refresh_after
# Coordinator is used to centralize the data updates
# Actions restricted to 1 at a time
PARALLEL_UPDATES = 1
async def async_setup_entry(
hass: HomeAssistant,

View File

@ -41,6 +41,9 @@ from .entity import (
async_check_create_deprecated,
)
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,

View File

@ -36,6 +36,10 @@ from .entity import (
_LOGGER = logging.getLogger(__name__)
# Coordinator is used to centralize the data updates
# Actions restricted to 1 at a time
PARALLEL_UPDATES = 1
@dataclass(frozen=True, kw_only=True)
class RingSirenEntityDescription(

View File

@ -27,6 +27,10 @@ from .entity import (
_LOGGER = logging.getLogger(__name__)
# Coordinator is used to centralize the data updates
# Actions restricted to 1 at a time
PARALLEL_UPDATES = 1
IN_HOME_CHIME_IS_PRESENT = {v for k, v in DOORBELL_EXISTING_TYPE.items() if k != 2}