From ceb0564ebf9ebbab9d22babbcf4f695e8c92df6f Mon Sep 17 00:00:00 2001 From: Oxan van Leeuwen Date: Wed, 4 Aug 2021 02:32:42 +0200 Subject: [PATCH] Fix mixup between ColorMode and ColorCapability (#2121) --- esphome/components/light/light_color_values.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/light/light_color_values.h b/esphome/components/light/light_color_values.h index 5a5a2f6e3..1bc22977a 100644 --- a/esphome/components/light/light_color_values.h +++ b/esphome/components/light/light_color_values.h @@ -179,7 +179,7 @@ class LightColorValues { /// Convert these light color values to an CWWW representation with the given parameters. void as_cwww(float color_temperature_cw, float color_temperature_ww, float *cold_white, float *warm_white, float gamma = 0, bool constant_brightness = false) const { - if (this->color_mode_ & ColorMode::COLD_WARM_WHITE) { + if (this->color_mode_ & ColorCapability::COLD_WARM_WHITE) { const float cw_level = gamma_correct(this->cold_white_, gamma); const float ww_level = gamma_correct(this->warm_white_, gamma); const float white_level = gamma_correct(this->state_ * this->brightness_, gamma);