1 """Coordinator for the Arve integration."""
3 from __future__
import annotations
5 from datetime
import timedelta
7 from asyncarve
import (
22 from .const
import DOMAIN, LOGGER
24 type ArveConfigEntry = ConfigEntry[ArveCoordinator]
28 """Arve coordinator."""
30 config_entry: ArveConfigEntry
33 def __init__(self, hass: HomeAssistant) ->
None:
34 """Initialize Arve coordinator."""
49 """Fetch data from API endpoint."""
55 await self.
arvearve.device_sensor_data(sn),
56 await self.
arvearve.get_sensor_info(sn),
58 for sn
in self.
devicesdevices.sn
60 except ArveConnectionError
as err:
61 raise UpdateFailed(
"Unable to connect to the Arve device")
from err
62 except ArveError
as err:
dict[str, ArveDeviceInfo] _async_update_data(self)
None __init__(self, HomeAssistant hass)
aiohttp.ClientSession async_get_clientsession(HomeAssistant hass, bool verify_ssl=True, socket.AddressFamily family=socket.AF_UNSPEC, ssl_util.SSLCipherList ssl_cipher=ssl_util.SSLCipherList.PYTHON_DEFAULT)