hass-core/homeassistant/components/escea/__init__.py
Laz a1d5a4bc79
Add Escea fireplace integration (#56039)
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>
2022-08-08 11:48:42 +02:00

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)