1 """Define an object to manage fetching Mastodon data."""
3 from __future__
import annotations
5 from datetime
import timedelta
8 from mastodon
import Mastodon
9 from mastodon.Mastodon
import MastodonError
14 from .const
import LOGGER
18 """Class to manage fetching Mastodon data."""
20 def __init__(self, hass: HomeAssistant, client: Mastodon) ->
None:
21 """Initialize coordinator."""
23 hass, logger=LOGGER, name=
"Mastodon", update_interval=
timedelta(hours=1)
29 account: dict = await self.
hasshass.async_add_executor_job(
30 self.
clientclient.account_verify_credentials
32 except MastodonError
as ex:
dict[str, Any] _async_update_data(self)
None __init__(self, HomeAssistant hass, Mastodon client)