Files
core/homeassistant/components/eafm/__init__.py
2021-12-28 21:13:20 +01:00

20 lines
550 B
Python

"""UK Environment Agency Flood Monitoring Integration."""
from homeassistant.const import Platform
from .const import DOMAIN
PLATFORMS = [Platform.SENSOR]
async def async_setup_entry(hass, entry):
"""Set up flood monitoring sensors for this config entry."""
hass.data.setdefault(DOMAIN, {})
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
return True
async def async_unload_entry(hass, entry):
"""Unload flood monitoring sensors."""
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)