diff --git a/homeassistant/components/mqtt/light/schema_template.py b/homeassistant/components/mqtt/light/schema_template.py index 44a87f2af2c84c..faf987881b988e 100644 --- a/homeassistant/components/mqtt/light/schema_template.py +++ b/homeassistant/components/mqtt/light/schema_template.py @@ -252,7 +252,7 @@ def state_received(msg): except ValueError: _LOGGER.warning("Invalid color value received") - if self._templates[CONF_COLOR_TEMP_TEMPLATE] is not None: + if self._templates[CONF_WHITE_VALUE_TEMPLATE] is not None: try: self._white_value = int( self._templates[