mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 15:38:11 +01:00
Fix CWWW/RGBWW lights (#562)
This commit is contained in:
parent
d7a8c50c98
commit
a9ae70cff1
2 changed files with 4 additions and 0 deletions
|
@ -19,6 +19,8 @@ class CWWWLightOutput : public light::LightOutput {
|
||||||
traits.set_supports_rgb(false);
|
traits.set_supports_rgb(false);
|
||||||
traits.set_supports_rgb_white_value(false);
|
traits.set_supports_rgb_white_value(false);
|
||||||
traits.set_supports_color_temperature(true);
|
traits.set_supports_color_temperature(true);
|
||||||
|
traits.set_min_mireds(this->cold_white_temperature_);
|
||||||
|
traits.set_min_mireds(this->warm_white_temperature_);
|
||||||
return traits;
|
return traits;
|
||||||
}
|
}
|
||||||
void write_state(light::LightState *state) override {
|
void write_state(light::LightState *state) override {
|
||||||
|
|
|
@ -22,6 +22,8 @@ class RGBWWLightOutput : public light::LightOutput {
|
||||||
traits.set_supports_rgb(true);
|
traits.set_supports_rgb(true);
|
||||||
traits.set_supports_rgb_white_value(true);
|
traits.set_supports_rgb_white_value(true);
|
||||||
traits.set_supports_color_temperature(true);
|
traits.set_supports_color_temperature(true);
|
||||||
|
traits.set_min_mireds(this->cold_white_temperature_);
|
||||||
|
traits.set_min_mireds(this->warm_white_temperature_);
|
||||||
return traits;
|
return traits;
|
||||||
}
|
}
|
||||||
void write_state(light::LightState *state) override {
|
void write_state(light::LightState *state) override {
|
||||||
|
|
Loading…
Reference in a new issue