From 3b0f67acd1c0ffaca947889c498874777475d484 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 25 Jun 2021 14:42:06 +0200 Subject: [PATCH] DSMR: Add deprecation warning for YAML configuration (#52179) --- homeassistant/components/dsmr/sensor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/homeassistant/components/dsmr/sensor.py b/homeassistant/components/dsmr/sensor.py index 42c8dd7fd54..cfdcbd95cf4 100644 --- a/homeassistant/components/dsmr/sensor.py +++ b/homeassistant/components/dsmr/sensor.py @@ -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