Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/mqtt/light/schema_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no test for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes there is a test, but the problem is that the test case has both the white_value_template and a color_temp_template set so this copy-paste-error was not found.
Maybe the test could be rewritten to be parametrized, and loop over a list of templates.

try:
self._white_value = int(
self._templates[
Expand Down