1 """Coordinator for the IKEA Idasen Desk integration."""
3 from __future__
import annotations
7 from idasen_ha
import Desk
13 _LOGGER = logging.getLogger(__name__)
17 """Class to manage updates for the Idasen Desk."""
22 logger: logging.Logger,
26 """Init IdasenDeskCoordinator."""
28 super().
__init__(hass, logger, name=name)
35 """Connect to desk."""
36 _LOGGER.debug(
"Trying to connect %s", self.
_address_address)
38 ble_device = bluetooth.async_ble_device_from_address(
41 if ble_device
is None:
42 _LOGGER.debug(
"No BLEDevice for %s", self.
_address_address)
44 await self.
deskdesk.connect(ble_device)
48 """Disconnect from desk."""
50 _LOGGER.debug(
"Disconnecting from %s", self.
_address_address)
51 await self.
deskdesk.disconnect()
54 """Ensure that the desk is connected if that is the expected state."""
None async_connect_if_expected(self)
None async_disconnect(self)
None __init__(self, HomeAssistant hass, logging.Logger logger, str name, str address)
None async_set_updated_data(self, _DataT data)