From e7392609e3bf81371edff16821a0a11f01849448 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 15 May 2021 13:09:45 +0200 Subject: [PATCH] Deprecate Jandy iAqualink YAML configuration (#50644) --- .../components/iaqualink/__init__.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/iaqualink/__init__.py b/homeassistant/components/iaqualink/__init__.py index 895733c5f35..a95ec804890 100644 --- a/homeassistant/components/iaqualink/__init__.py +++ b/homeassistant/components/iaqualink/__init__.py @@ -54,19 +54,22 @@ PLATFORMS = [ ] 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, ) -async def async_setup(hass: HomeAssistant, config: ConfigType) -> None: +async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the Aqualink component.""" conf = config.get(DOMAIN)