From 2fb16fd06c049def3f88d482530f28dfcf498360 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 29 Apr 2022 21:40:23 +0200 Subject: [PATCH] Deprecate white_value support in template light (#71044) --- homeassistant/components/template/light.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/template/light.py b/homeassistant/components/template/light.py index 17513d6122258..efe123f36b50c 100644 --- a/homeassistant/components/template/light.py +++ b/homeassistant/components/template/light.py @@ -94,8 +94,13 @@ ).extend(TEMPLATE_ENTITY_COMMON_SCHEMA_LEGACY.schema), ) -PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( - {vol.Required(CONF_LIGHTS): cv.schema_with_slug_keys(LIGHT_SCHEMA)} +PLATFORM_SCHEMA = vol.All( + # CONF_WHITE_VALUE_* is deprecated, support will be removed in release 2022.9 + cv.deprecated(CONF_WHITE_VALUE_ACTION), + cv.deprecated(CONF_WHITE_VALUE_TEMPLATE), + PLATFORM_SCHEMA.extend( + {vol.Required(CONF_LIGHTS): cv.schema_with_slug_keys(LIGHT_SCHEMA)} + ), )