hass-core/homeassistant/components/edl21/__init__.py
Stephan Uhle adb0455bd2
Add config flow to EDL21 (#87655)
* Added config_flow for edl21.

* Added already_configured check.

* Added config_flow test

* Added setup of the edl21 from configuration.yaml

* Ran script.gen_requirements_all

* Removed the generated translation file.

* Added a deprecation warning when importing from configuration.yaml.

* Readded the platform schema.

* Added handling of optional name for legacy configuration.

* Fixed handling of default value in legacy configuration.

* Added duplication check entries created via legacy config.

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-01 21:19:20 +01:00

18 lines
645 B
Python

"""The edl21 component."""
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
PLATFORMS = [Platform.SENSOR]
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
"""Set up EDL21 integration from a config entry."""
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
return True
async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
"""Unload a config entry."""
return await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)