2019-02-13 20:21:14 +00:00
|
|
|
"""Support for the Swedish weather institute weather service."""
|
2018-10-08 21:54:55 +00:00
|
|
|
from homeassistant.config_entries import ConfigEntry
|
2021-04-16 16:22:56 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
2018-10-08 21:54:55 +00:00
|
|
|
|
2021-04-27 20:10:04 +00:00
|
|
|
PLATFORMS = ["weather"]
|
2018-10-08 21:54:55 +00:00
|
|
|
|
2021-04-27 20:10:04 +00:00
|
|
|
|
|
|
|
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
2018-11-13 09:01:14 +00:00
|
|
|
"""Set up SMHI forecast as config entry."""
|
2021-04-27 20:10:04 +00:00
|
|
|
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
|
2018-10-08 21:54:55 +00:00
|
|
|
return True
|
|
|
|
|
|
|
|
|
2021-04-27 20:10:04 +00:00
|
|
|
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
2018-10-08 21:54:55 +00:00
|
|
|
"""Unload a config entry."""
|
2021-04-27 20:10:04 +00:00
|
|
|
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|