1 """The JustNimbus integration."""
3 from __future__
import annotations
9 from .const
import DOMAIN, PLATFORMS
10 from .coordinator
import JustNimbusCoordinator
14 """Set up JustNimbus from a config entry."""
15 if "zip_code" in entry.data:
18 raise ConfigEntryAuthFailed
19 await coordinator.async_config_entry_first_refresh()
21 hass.data.setdefault(DOMAIN, {})[entry.entry_id] = coordinator
22 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
27 """Unload a config entry."""
28 if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
29 hass.data[DOMAIN].pop(entry.entry_id)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)