2020-08-10 13:51:04 +00:00
|
|
|
"""UK Environment Agency Flood Monitoring Integration."""
|
|
|
|
|
|
|
|
from .const import DOMAIN
|
|
|
|
|
2021-04-27 06:46:49 +00:00
|
|
|
PLATFORMS = ["sensor"]
|
2020-08-10 13:51:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
async def async_setup_entry(hass, entry):
|
|
|
|
"""Set up flood monitoring sensors for this config entry."""
|
2021-04-27 06:46:49 +00:00
|
|
|
hass.data.setdefault(DOMAIN, {})
|
|
|
|
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
|
2020-08-10 13:51:04 +00:00
|
|
|
return True
|
|
|
|
|
|
|
|
|
2021-04-27 06:46:49 +00:00
|
|
|
async def async_unload_entry(hass, entry):
|
2020-08-10 13:51:04 +00:00
|
|
|
"""Unload flood monitoring sensors."""
|
2021-04-27 06:46:49 +00:00
|
|
|
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|