From f5c31b89f8790677d1570c4d8861a85f77c7c4ac Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 14 May 2021 15:46:49 +0200 Subject: [PATCH] Deprecate SmartHab YAML configuration (#50602) --- homeassistant/components/smarthab/__init__.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/smarthab/__init__.py b/homeassistant/components/smarthab/__init__.py index 7759d038224..3777f35dbc2 100644 --- a/homeassistant/components/smarthab/__init__.py +++ b/homeassistant/components/smarthab/__init__.py @@ -17,14 +17,17 @@ PLATFORMS = ["light", "cover"] _LOGGER = logging.getLogger(__name__) CONFIG_SCHEMA = vol.Schema( - { - DOMAIN: vol.Schema( - { - vol.Required(CONF_EMAIL): cv.string, - vol.Required(CONF_PASSWORD): cv.string, - } - ) - }, + vol.All( + cv.deprecated(DOMAIN), + { + DOMAIN: vol.Schema( + { + vol.Required(CONF_EMAIL): cv.string, + vol.Required(CONF_PASSWORD): cv.string, + } + ) + }, + ), extra=vol.ALLOW_EXTRA, )