1 """Rabbit Air Update Coordinator."""
3 from collections.abc
import Coroutine
4 from datetime
import timedelta
6 from typing
import Any, cast
8 from rabbitair
import Client, State
14 _LOGGER = logging.getLogger(__name__)
18 """Class to rate limit calls to a specific command."""
24 """Initialize debounce."""
29 super().
__init__(hass, _LOGGER, cooldown=2.0, immediate=
False)
32 """Call the function."""
38 """Indicate that the debouncer has a call waiting for cooldown."""
43 """Class to manage fetching data from single endpoint."""
45 def __init__(self, hass: HomeAssistant, device: Client) ->
None:
46 """Initialize global data updater."""
61 log_failures: bool =
True,
62 raise_on_auth_failed: bool =
False,
63 scheduled: bool =
False,
64 raise_on_entry_error: bool =
False,
70 if scheduled
and debouncer.has_pending_call():
74 log_failures, raise_on_auth_failed, scheduled, raise_on_entry_error
None _async_refresh(self, bool log_failures=True, bool raise_on_auth_failed=False, bool scheduled=False, bool raise_on_entry_error=False)
None __init__(self, HomeAssistant hass, Client device)
State _async_update_data(self)
None __init__(self, HomeAssistant hass)
bool has_pending_call(self)
str|float get_state(dict[str, float] data, str key)