Home Assistant Unofficial Reference 2024.12.1
__init__.py
Go to the documentation of this file.
1 """The edl21 component."""
2 
3 from homeassistant.config_entries import ConfigEntry
4 from homeassistant.const import Platform
5 from homeassistant.core import HomeAssistant
6 
7 PLATFORMS = [Platform.SENSOR]
8 
9 
10 async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
11  """Set up EDL21 integration from a config entry."""
12  await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
13  return True
14 
15 
16 async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
17  """Unload a config entry."""
18  return await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)
bool async_unload_entry(HomeAssistant hass, ConfigEntry config_entry)
Definition: __init__.py:16
bool async_setup_entry(HomeAssistant hass, ConfigEntry config_entry)
Definition: __init__.py:10