1 """The air-Q integration."""
3 from __future__
import annotations
5 from datetime
import timedelta
8 from aioairq
import AirQ
17 from .const
import DOMAIN, MANUFACTURER, UPDATE_INTERVAL
19 _LOGGER = logging.getLogger(__name__)
23 """Coordinator is responsible for querying the device at a specified route."""
29 clip_negative: bool =
True,
30 return_average: bool =
True,
32 """Initialise a custom coordinator."""
37 update_interval=
timedelta(seconds=UPDATE_INTERVAL),
41 entry.data[CONF_IP_ADDRESS], entry.data[CONF_PASSWORD], session
44 assert self.
device_iddevice_id
is not None
46 manufacturer=MANUFACTURER,
47 identifiers={(DOMAIN, self.
device_iddevice_id)},
53 """Fetch the data from the device."""
55 info = await self.
airqairq.fetch_device_info()
60 sw_version=info[
"sw_version"],
61 hw_version=info[
"hw_version"],
64 return await self.
airqairq.get_latest_data(
dict _async_update_data(self)
None __init__(self, HomeAssistant hass, ConfigEntry entry, bool clip_negative=True, bool return_average=True)
IssData update(pyiss.ISS iss)
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)