Fix lingering timer in iaqualink (#92856)
parent
2c79adad5e
commit
0cc3e8200c
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||
|
||||
import asyncio
|
||||
from collections.abc import Awaitable, Callable, Coroutine
|
||||
from datetime import datetime
|
||||
from functools import wraps
|
||||
import logging
|
||||
from typing import Any, Concatenate, ParamSpec, TypeVar
|
||||
|
@ -139,7 +140,7 @@ async def async_setup_entry( # noqa: C901
|
|||
|
||||
await hass.config_entries.async_forward_entry_setups(entry, platforms)
|
||||
|
||||
async def _async_systems_update(now):
|
||||
async def _async_systems_update(_: datetime) -> None:
|
||||
"""Refresh internal state for all systems."""
|
||||
for system in systems:
|
||||
prev = system.online
|
||||
|
@ -161,7 +162,9 @@ async def async_setup_entry( # noqa: C901
|
|||
|
||||
async_dispatcher_send(hass, DOMAIN)
|
||||
|
||||
async_track_time_interval(hass, _async_systems_update, UPDATE_INTERVAL)
|
||||
entry.async_on_unload(
|
||||
async_track_time_interval(hass, _async_systems_update, UPDATE_INTERVAL)
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue