From b2c0bebbf0c2a5303b6adacc50de7a48bbdf0c5f Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 15 May 2021 13:56:23 +0200 Subject: [PATCH] Deprecate VeSync YAML configuration (#50652) --- homeassistant/components/vesync/__init__.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/vesync/__init__.py b/homeassistant/components/vesync/__init__.py index 9a79ca1fbb4..3a17af55c93 100644 --- a/homeassistant/components/vesync/__init__.py +++ b/homeassistant/components/vesync/__init__.py @@ -26,14 +26,17 @@ PLATFORMS = ["switch", "fan", "light"] _LOGGER = logging.getLogger(__name__) CONFIG_SCHEMA = vol.Schema( - { - DOMAIN: vol.Schema( - { - vol.Required(CONF_USERNAME): cv.string, - vol.Required(CONF_PASSWORD): cv.string, - } - ) - }, + vol.All( + cv.deprecated(DOMAIN), + { + DOMAIN: vol.Schema( + { + vol.Required(CONF_USERNAME): cv.string, + vol.Required(CONF_PASSWORD): cv.string, + } + ) + }, + ), extra=vol.ALLOW_EXTRA, )