Add parallel updates to Fritz (#142409)

* Add parallel updates to Fritz

* apply review comment

* tweak
pull/142338/head^2
Simone Chemelli 2025-04-06 17:28:51 +02:00 committed by GitHub
parent 9a897d5e12
commit e96f2f06fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 22 additions and 3 deletions

View File

@ -20,6 +20,9 @@ from .entity import FritzBoxBaseCoordinatorEntity, FritzEntityDescription
_LOGGER = logging.getLogger(__name__)
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
@dataclass(frozen=True, kw_only=True)
class FritzBinarySensorEntityDescription(

View File

@ -31,6 +31,9 @@ from .entity import FritzDeviceBase
_LOGGER = logging.getLogger(__name__)
# Set a sane value to avoid too many updates
PARALLEL_UPDATES = 5
@dataclass(frozen=True, kw_only=True)
class FritzButtonDescription(ButtonEntityDescription):

View File

@ -22,6 +22,9 @@ from .entity import FritzDeviceBase
_LOGGER = logging.getLogger(__name__)
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,

View File

@ -18,6 +18,9 @@ from .entity import FritzBoxBaseEntity
_LOGGER = logging.getLogger(__name__)
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,

View File

@ -33,9 +33,7 @@ rules:
entity-unavailable: done
integration-owner: done
log-when-unavailable: done
parallel-updates:
status: todo
comment: not set at the moment, we use a coordinator
parallel-updates: done
reauthentication-flow: done
test-coverage:
status: todo

View File

@ -32,6 +32,9 @@ from .entity import FritzBoxBaseCoordinatorEntity, FritzEntityDescription
_LOGGER = logging.getLogger(__name__)
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
def _uptime_calculation(seconds_uptime: float, last_value: datetime | None) -> datetime:
"""Calculate uptime with deviation."""

View File

@ -38,6 +38,9 @@ from .entity import FritzBoxBaseEntity, FritzDeviceBase
_LOGGER = logging.getLogger(__name__)
# Set a sane value to avoid too many updates
PARALLEL_UPDATES = 5
async def _async_deflection_entities_list(
avm_wrapper: AvmWrapper, device_friendly_name: str

View File

@ -20,6 +20,9 @@ from .entity import FritzBoxBaseCoordinatorEntity, FritzEntityDescription
_LOGGER = logging.getLogger(__name__)
# Set a sane value to avoid too many updates
PARALLEL_UPDATES = 5
@dataclass(frozen=True, kw_only=True)
class FritzUpdateEntityDescription(UpdateEntityDescription, FritzEntityDescription):