From a9ae70cff1f7245213b5e29a3f27ea6f3fecf2fe Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Tue, 28 May 2019 20:44:27 +0200 Subject: [PATCH] Fix CWWW/RGBWW lights (#562) --- esphome/components/cwww/cwww_light_output.h | 2 ++ esphome/components/rgbww/rgbww_light_output.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/esphome/components/cwww/cwww_light_output.h b/esphome/components/cwww/cwww_light_output.h index 4497d051e4..1fa23846a0 100644 --- a/esphome/components/cwww/cwww_light_output.h +++ b/esphome/components/cwww/cwww_light_output.h @@ -19,6 +19,8 @@ class CWWWLightOutput : public light::LightOutput { traits.set_supports_rgb(false); traits.set_supports_rgb_white_value(false); traits.set_supports_color_temperature(true); + traits.set_min_mireds(this->cold_white_temperature_); + traits.set_min_mireds(this->warm_white_temperature_); return traits; } void write_state(light::LightState *state) override { diff --git a/esphome/components/rgbww/rgbww_light_output.h b/esphome/components/rgbww/rgbww_light_output.h index dc1f09e09b..4a80ba3222 100644 --- a/esphome/components/rgbww/rgbww_light_output.h +++ b/esphome/components/rgbww/rgbww_light_output.h @@ -22,6 +22,8 @@ class RGBWWLightOutput : public light::LightOutput { traits.set_supports_rgb(true); traits.set_supports_rgb_white_value(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; } void write_state(light::LightState *state) override {