core/homeassistant/components/ipma/__init__.py

27 lines
761 B
Python
Raw Normal View History

"""Component for the Portuguese weather service - IPMA."""
from homeassistant.core import Config, HomeAssistant
2019-12-05 15:56:01 +00:00
from .config_flow import IpmaFlowHandler # noqa: F401
from .const import DOMAIN # noqa: F401
2019-07-31 19:25:30 +00:00
DEFAULT_NAME = "ipma"
async def async_setup(hass: HomeAssistant, config: Config) -> bool:
"""Set up configured IPMA."""
return True
async def async_setup_entry(hass, config_entry):
"""Set up IPMA station as config entry."""
2019-07-31 19:25:30 +00:00
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, "weather")
)
return True
async def async_unload_entry(hass, config_entry):
"""Unload a config entry."""
2019-07-31 19:25:30 +00:00
await hass.config_entries.async_forward_entry_unload(config_entry, "weather")
return True