from collections.abc import Hashable
from datetime import datetime, timedelta
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from typing import Any, Callable

_LOGGER: Any

class KeyedRateLimit:
    hass: Any
    _last_triggered: Any
    _rate_limit_timers: Any
    def __init__(self, hass: HomeAssistant) -> None: ...
    def async_has_timer(self, key: Hashable) -> bool: ...
    def async_triggered(self, key: Hashable, now: Union[datetime, None] = ...) -> None: ...
    def async_cancel_timer(self, key: Hashable) -> None: ...
    def async_remove(self) -> None: ...
    def async_schedule_action(self, key: Hashable, rate_limit: Union[timedelta, None], now: datetime, action: Callable, *args: Any) -> Union[datetime, None]: ...
