Co-authored-by: Teemu R. <tpr@iki.fi> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
22 lines
833 B
Python
22 lines
833 B
Python
"""Platform for the Escea fireplace."""
|
|
|
|
from homeassistant.components.climate import DOMAIN as CLIMATE_DOMAIN
|
|
from homeassistant.config_entries import ConfigEntry
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .discovery import async_start_discovery_service, async_stop_discovery_service
|
|
|
|
PLATFORMS = [CLIMATE_DOMAIN]
|
|
|
|
|
|
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|
"""Set up from a config entry."""
|
|
await async_start_discovery_service(hass)
|
|
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
|
|
return True
|
|
|
|
|
|
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|
"""Unload the config entry and stop discovery process."""
|
|
await async_stop_discovery_service(hass)
|
|
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|