mirror of
https://github.com/home-assistant/core
synced 2024-09-03 08:14:07 +02:00
27 lines
761 B
Python
27 lines
761 B
Python
"""Component for the Portuguese weather service - IPMA."""
|
|
from homeassistant.core import Config, HomeAssistant
|
|
|
|
from .config_flow import IpmaFlowHandler # noqa: F401
|
|
from .const import DOMAIN # noqa: F401
|
|
|
|
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."""
|
|
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."""
|
|
await hass.config_entries.async_forward_entry_unload(config_entry, "weather")
|
|
return True
|