1 """The totalconnect component."""
3 from datetime
import timedelta
6 from total_connect_client.client
import TotalConnectClient
7 from total_connect_client.exceptions
import (
18 from .const
import DOMAIN
21 _LOGGER = logging.getLogger(__name__)
25 """Class to fetch data from TotalConnect."""
27 config_entry: ConfigEntry
29 def __init__(self, hass: HomeAssistant, client: TotalConnectClient) ->
None:
33 hass, logger=_LOGGER, name=DOMAIN, update_interval=SCAN_INTERVAL
41 """Fetch synchronous data from TotalConnect."""
43 for location_id
in self.
clientclient.locations:
44 self.
clientclient.locations[location_id].get_panel_meta_data()
45 except AuthenticationError
as exception:
48 "TotalConnect authentication failed during operation."
50 except ServiceUnavailable
as exception:
52 "Error connecting to TotalConnect or the service is unavailable. "
53 "Check https://status.resideo.com/ for outages."
55 except TotalConnectError
as exception:
57 except ValueError
as exception:
58 raise UpdateFailed(
"Unknown state from TotalConnect")
from exception
None __init__(self, HomeAssistant hass, TotalConnectClient client)
None sync_update_data(self)
None _async_update_data(self)