mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Add PARALLEL_UPDATES constant to ring integration platforms (#136470)
This commit is contained in:
parent
b0188772bc
commit
1697e24068
@ -30,6 +30,9 @@ from .entity import (
|
|||||||
async_check_create_deprecated,
|
async_check_create_deprecated,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True, kw_only=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class RingBinarySensorEntityDescription(
|
class RingBinarySensorEntityDescription(
|
||||||
|
@ -12,6 +12,10 @@ from . import RingConfigEntry
|
|||||||
from .coordinator import RingDataCoordinator
|
from .coordinator import RingDataCoordinator
|
||||||
from .entity import RingEntity, exception_wrap
|
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(
|
BUTTON_DESCRIPTION = ButtonEntityDescription(
|
||||||
key="open_door", translation_key="open_door"
|
key="open_door", translation_key="open_door"
|
||||||
)
|
)
|
||||||
|
@ -34,6 +34,10 @@ from . import RingConfigEntry
|
|||||||
from .coordinator import RingDataCoordinator
|
from .coordinator import RingDataCoordinator
|
||||||
from .entity import RingDeviceT, RingEntity, exception_wrap
|
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)
|
FORCE_REFRESH_INTERVAL = timedelta(minutes=3)
|
||||||
MOTION_DETECTION_CAPABILITY = "motion_detection"
|
MOTION_DETECTION_CAPABILITY = "motion_detection"
|
||||||
|
|
||||||
|
@ -18,6 +18,9 @@ from . import RingConfigEntry
|
|||||||
from .coordinator import RingListenCoordinator
|
from .coordinator import RingListenCoordinator
|
||||||
from .entity import RingBaseEntity, RingDeviceT
|
from .entity import RingBaseEntity, RingDeviceT
|
||||||
|
|
||||||
|
# Event entity does not perform updates or actions.
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True, kw_only=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class RingEventEntityDescription(EventEntityDescription, Generic[RingDeviceT]):
|
class RingEventEntityDescription(EventEntityDescription, Generic[RingDeviceT]):
|
||||||
|
@ -18,6 +18,9 @@ from .entity import RingEntity, exception_wrap
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_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
|
# 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
|
# that the changes have been made. Once we request a change (i.e. a light
|
||||||
|
@ -20,6 +20,10 @@ from . import RingConfigEntry
|
|||||||
from .coordinator import RingDataCoordinator
|
from .coordinator import RingDataCoordinator
|
||||||
from .entity import RingDeviceT, RingEntity, refresh_after
|
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(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -41,6 +41,9 @@ from .entity import (
|
|||||||
async_check_create_deprecated,
|
async_check_create_deprecated,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -36,6 +36,10 @@ from .entity import (
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_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)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class RingSirenEntityDescription(
|
class RingSirenEntityDescription(
|
||||||
|
@ -27,6 +27,10 @@ from .entity import (
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_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}
|
IN_HOME_CHIME_IS_PRESENT = {v for k, v in DOORBELL_EXISTING_TYPE.items() if k != 2}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user