DSMR: Add deprecation warning for YAML configuration ()

pull/52190/head
Franck Nijhof 2021-06-25 14:42:06 +02:00 committed by GitHub
parent bc2689fd75
commit 3b0f67acd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions
homeassistant/components/dsmr

View File

@ -64,6 +64,12 @@ async def async_setup_platform(
discovery_info: dict[str, Any] | None = None,
) -> None:
"""Import the platform into a config entry."""
LOGGER.warning(
"Configuration of the DSMR platform in YAML is deprecated and will be "
"removed in Home Assistant 2021.9; Your existing configuration "
"has been imported into the UI automatically and can be safely removed "
"from your configuration.yaml file"
)
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=config