DSMR: Add deprecation warning for YAML configuration (#52179)
parent
bc2689fd75
commit
3b0f67acd1
homeassistant/components/dsmr
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue