1 """Component to embed TP-Link smart home devices."""
3 from __future__
import annotations
5 from datetime
import timedelta
8 from kasa
import AuthenticationError, Device, KasaException
10 from homeassistant
import config_entries
16 _LOGGER = logging.getLogger(__name__)
18 REQUEST_REFRESH_DELAY = 0.35
22 """DataUpdateCoordinator to gather data for a specific TPLink device."""
30 update_interval: timedelta,
32 """Initialize DataUpdateCoordinator to gather data for specific SmartPlug."""
38 update_interval=update_interval,
42 hass, _LOGGER, cooldown=REQUEST_REFRESH_DELAY, immediate=
False
47 """Fetch all device and sensor data from api."""
50 except AuthenticationError
as ex:
51 raise ConfigEntryAuthFailed
from ex
52 except KasaException
as ex:
None __init__(self, HomeAssistant hass, Device device, timedelta update_interval)
None _async_update_data(self)
IssData update(pyiss.ISS iss)