Define __init__ before other methods in BleBox (#187550)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Joost Lekkerkerker
2026-10-20 18:58:02 +02:00
committed by GitHub
co-authored by Claude
parent a19548a592
commit 16207ebc93
+6 -6
View File
@@ -52,12 +52,6 @@ class BleBoxUpdateEntity(BleBoxEntity[blebox_uniapi.update.Update], UpdateEntity
UpdateEntityFeature.INSTALL | UpdateEntityFeature.PROGRESS
)
@property
@override
def should_poll(self) -> bool:
"""Return True because firmware versions cannot be fetched via coordinator."""
return True
def __init__(
self, coordinator: BleBoxCoordinator, feature: blebox_uniapi.update.Update
) -> None:
@@ -67,6 +61,12 @@ class BleBoxUpdateEntity(BleBoxEntity[blebox_uniapi.update.Update], UpdateEntity
self._poll_cancel: CALLBACK_TYPE | None = None
self._poll_attempts: int = 0
@property
@override
def should_poll(self) -> bool:
"""Return True because firmware versions cannot be fetched via coordinator."""
return True
@property
@override
def in_progress(self) -> bool: