mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Fix mixup between ColorMode and ColorCapability (#2121)
This commit is contained in:
parent
20f7eb7327
commit
ceb0564ebf
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue