1 """Data update coordinator for the SimpleFIN integration."""
3 from __future__
import annotations
5 from datetime
import timedelta
8 from simplefin4py
import FinancialData, SimpleFin
9 from simplefin4py.exceptions
import SimpleFinAuthError, SimpleFinPaymentRequiredError
16 from .const
import LOGGER
20 """Data update coordinator for the SimpleFIN integration."""
22 config_entry: ConfigEntry
24 def __init__(self, hass: HomeAssistant, client: SimpleFin) ->
None:
25 """Initialize the coordinator."""
35 """Fetch data for all accounts."""
38 except SimpleFinAuthError
as err:
41 except SimpleFinPaymentRequiredError
as err:
43 "There is a billing issue with your SimpleFin account, contact Simplefin to address this issue"
45 raise UpdateFailed
from err
Any _async_update_data(self)
None __init__(self, HomeAssistant hass, SimpleFin client)
MetOfficeData fetch_data(datapoint.Manager connection, Site site, str mode)