1 """The iotawatt integration."""
7 from .const
import DOMAIN
8 from .coordinator
import IotawattUpdater
10 PLATFORMS = [Platform.SENSOR]
14 """Set up iotawatt from a config entry."""
16 await coordinator.async_config_entry_first_refresh()
17 hass.data.setdefault(DOMAIN, {})[entry.entry_id] = coordinator
18 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
23 """Unload a config entry."""
24 if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
25 hass.data[DOMAIN].pop(entry.entry_id)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)