From e593377fba1a517d06a3d6fb496a8247f5c3e2f6 Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Wed, 22 Dec 2021 16:17:53 -0500 Subject: [PATCH] Add deprecation warning to switchbot yaml config (#62583) Co-authored-by: Franck Nijhof --- homeassistant/components/switchbot/switch.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/homeassistant/components/switchbot/switch.py b/homeassistant/components/switchbot/switch.py index 76353559756..20e8a58b6ee 100644 --- a/homeassistant/components/switchbot/switch.py +++ b/homeassistant/components/switchbot/switch.py @@ -49,6 +49,12 @@ async def async_setup_platform( discovery_info: DiscoveryInfoType | None = None, ) -> None: """Import yaml config and initiates config flow for Switchbot devices.""" + _LOGGER.warning( + "Configuration of the Switchbot switch platform in YAML is deprecated and " + "will be removed in Home Assistant 2022.4; Your existing configuration " + "has been imported into the UI automatically and can be safely removed " + "from your configuration.yaml file" + ) # Check if entry config exists and skips import if it does. if hass.config_entries.async_entries(DOMAIN):