Improve debouncer typing (#75436)
This commit is contained in:
parent
4b036cbad9
commit
5ae5ae5392
11 changed files with 33 additions and 20 deletions
|
@ -2,6 +2,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Coroutine
|
||||
import logging
|
||||
import time
|
||||
from typing import TYPE_CHECKING, Any, NamedTuple, cast
|
||||
|
@ -832,7 +833,7 @@ def async_setup_cleanup(hass: HomeAssistant, dev_reg: DeviceRegistry) -> None:
|
|||
ent_reg = entity_registry.async_get(hass)
|
||||
async_cleanup(hass, dev_reg, ent_reg)
|
||||
|
||||
debounced_cleanup = Debouncer(
|
||||
debounced_cleanup: Debouncer[Coroutine[Any, Any, None]] = Debouncer(
|
||||
hass, _LOGGER, cooldown=CLEANUP_DELAY, immediate=False, function=cleanup
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue