mirror of
https://github.com/esphome/esphome.git
synced 2024-12-23 16:47:57 +01:00
Fix mixup between ColorMode and ColorCapability (#2121)
This commit is contained in:
parent
20f7eb7327
commit
ceb0564ebf
@ -179,7 +179,7 @@ class LightColorValues {
|
|||||||
/// Convert these light color values to an CWWW representation with the given parameters.
|
/// 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,
|
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 {
|
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 cw_level = gamma_correct(this->cold_white_, gamma);
|
||||||
const float ww_level = gamma_correct(this->warm_white_, gamma);
|
const float ww_level = gamma_correct(this->warm_white_, gamma);
|
||||||
const float white_level = gamma_correct(this->state_ * this->brightness_, gamma);
|
const float white_level = gamma_correct(this->state_ * this->brightness_, gamma);
|
||||||
|
Loading…
Reference in New Issue
Block a user