1 """Coordinator for The Internet Printing Protocol (IPP) integration."""
3 from __future__
import annotations
5 from datetime
import timedelta
8 from pyipp
import IPP, IPPError, Printer
as IPPPrinter
14 from .const
import DOMAIN
18 _LOGGER = logging.getLogger(__name__)
22 """Class to manage fetching IPP data from single endpoint."""
35 """Initialize global IPP data updater."""
42 verify_ssl=verify_ssl,
50 update_interval=SCAN_INTERVAL,
54 """Fetch data from IPP."""
56 return await self.
ippipp.printer()
57 except IPPError
as error:
58 raise UpdateFailed(f
"Invalid response from API: {error}")
from error
IPPPrinter _async_update_data(self)
None __init__(self, HomeAssistant hass, *str host, int port, str base_path, bool tls, bool verify_ssl, str device_id)
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)