1 """The iotty integration."""
3 from __future__
import annotations
5 from dataclasses
import dataclass
8 from iottycloud.device
import Device
15 async_get_config_entry_implementation,
18 from .
import coordinator
20 _LOGGER = logging.getLogger(__name__)
22 PLATFORMS: list[Platform] = [Platform.COVER, Platform.SWITCH]
24 type IottyConfigEntry = ConfigEntry[IottyConfigEntryData]
29 """Contains config entry data for iotty."""
31 known_devices: set[Device]
36 """Set up iotty from a config entry."""
37 _LOGGER.debug(
"async_setup_entry entry_id=%s", entry.entry_id)
48 await data_update_coordinator.async_config_entry_first_refresh()
50 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
55 """Unload a config entry."""
56 return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, IottyConfigEntry entry)
AbstractOAuth2Implementation async_get_config_entry_implementation(HomeAssistant hass, config_entries.ConfigEntry config_entry)