1 """The Stookalert integration."""
3 from __future__
import annotations
11 from .const
import CONF_PROVINCE, DOMAIN
13 PLATFORMS = [Platform.BINARY_SENSOR]
17 """Set up Stookalert from a config entry."""
18 hass.data.setdefault(DOMAIN, {})
19 hass.data[DOMAIN][entry.entry_id] = stookalert.stookalert(entry.data[CONF_PROVINCE])
20 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
25 """Unload Stookalert config entry."""
26 unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
28 del hass.data[DOMAIN][entry.entry_id]
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)