Move netatmo dataclass registrations (#65052)
This commit is contained in:
parent
de7f1e793a
commit
0a2f57e4f8
9 changed files with 27 additions and 23 deletions
|
@ -74,7 +74,7 @@ class NetatmoDataClass:
|
|||
name: str
|
||||
interval: int
|
||||
next_scan: float
|
||||
subscriptions: list[CALLBACK_TYPE]
|
||||
subscriptions: list[CALLBACK_TYPE | None]
|
||||
|
||||
|
||||
class NetatmoDataHandler:
|
||||
|
@ -105,6 +105,18 @@ class NetatmoDataHandler:
|
|||
)
|
||||
)
|
||||
|
||||
await asyncio.gather(
|
||||
*[
|
||||
self.register_data_class(data_class, data_class, None)
|
||||
for data_class in (
|
||||
CLIMATE_TOPOLOGY_CLASS_NAME,
|
||||
CAMERA_DATA_CLASS_NAME,
|
||||
WEATHERSTATION_DATA_CLASS_NAME,
|
||||
HOMECOACH_DATA_CLASS_NAME,
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
async def async_update(self, event_time: datetime) -> None:
|
||||
"""
|
||||
Update device.
|
||||
|
@ -172,7 +184,7 @@ class NetatmoDataHandler:
|
|||
self,
|
||||
data_class_name: str,
|
||||
data_class_entry: str,
|
||||
update_callback: CALLBACK_TYPE,
|
||||
update_callback: CALLBACK_TYPE | None,
|
||||
**kwargs: Any,
|
||||
) -> None:
|
||||
"""Register data class."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue