From 8dd971b25e6a865d7f0e731355e881fa502a0a0d Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 30 May 2019 19:33:47 +1200 Subject: [PATCH] Correctly set warm white variables (#569) --- esphome/components/cwww/cwww_light_output.h | 2 +- esphome/components/rgbww/light.py | 2 +- esphome/components/rgbww/rgbww_light_output.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/cwww/cwww_light_output.h b/esphome/components/cwww/cwww_light_output.h index 1fa23846a0..8192039511 100644 --- a/esphome/components/cwww/cwww_light_output.h +++ b/esphome/components/cwww/cwww_light_output.h @@ -20,7 +20,7 @@ class CWWWLightOutput : public light::LightOutput { 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_); + traits.set_max_mireds(this->warm_white_temperature_); return traits; } void write_state(light::LightState *state) override { diff --git a/esphome/components/rgbww/light.py b/esphome/components/rgbww/light.py index 143542f49c..c804eed942 100644 --- a/esphome/components/rgbww/light.py +++ b/esphome/components/rgbww/light.py @@ -37,4 +37,4 @@ def to_code(config): wwhite = yield cg.get_variable(config[CONF_WARM_WHITE]) cg.add(var.set_warm_white(wwhite)) - cg.add(var.set_warm_white_temperature(config[CONF_COLD_WHITE_COLOR_TEMPERATURE])) + cg.add(var.set_warm_white_temperature(config[CONF_WARM_WHITE_COLOR_TEMPERATURE])) diff --git a/esphome/components/rgbww/rgbww_light_output.h b/esphome/components/rgbww/rgbww_light_output.h index 4a80ba3222..ef9e99a3eb 100644 --- a/esphome/components/rgbww/rgbww_light_output.h +++ b/esphome/components/rgbww/rgbww_light_output.h @@ -23,7 +23,7 @@ class RGBWWLightOutput : public light::LightOutput { 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_); + traits.set_max_mireds(this->warm_white_temperature_); return traits; } void write_state(light::LightState *state) override {