From fb7c83a1b504dc82fc7c233a12584a2b3fadf6b6 Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Mon, 13 Jun 2022 23:53:55 +0300 Subject: [PATCH] color_mode 1.2.1 --- xiaomi_light.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xiaomi_light.h b/xiaomi_light.h index b2154b8..84d04a1 100644 --- a/xiaomi_light.h +++ b/xiaomi_light.h @@ -13,10 +13,7 @@ class XiaomiLight : public Component, public LightOutput { } LightTraits get_traits() override { auto traits = light::LightTraits(); - traits.set_supports_brightness(true); - traits.set_supports_rgb(false); - traits.set_supports_rgb_white_value(false); - traits.set_supports_color_temperature(true); + traits.set_supported_color_modes({light::ColorMode::BRIGHTNESS, light::ColorMode::COLOR_TEMPERATURE}); traits.set_min_mireds(this->color_temperature_cw_); traits.set_max_mireds(this->color_temperature_ww_); return traits;