|
|
@ -28,7 +28,15 @@ class XiaomiBslamp2LightOutput : public Component, public light::LightOutput { |
|
|
|
*/ |
|
|
|
light::LightTraits get_traits() override { |
|
|
|
auto traits = light::LightTraits(); |
|
|
|
#ifdef HAS_COLOR_MODES |
|
|
|
traits.set_supported_color_modes({light::ColorMode::RGB, light::ColorMode::COLOR_TEMPERATURE}); |
|
|
|
#else |
|
|
|
traits.set_supports_rgb(true); |
|
|
|
traits.set_supports_color_temperature(true); |
|
|
|
traits.set_supports_brightness(true); |
|
|
|
traits.set_supports_rgb_white_value(false); |
|
|
|
traits.set_supports_color_interlock(true); |
|
|
|
#endif |
|
|
|
traits.set_min_mireds(MIRED_MIN); |
|
|
|
traits.set_max_mireds(MIRED_MAX); |
|
|
|
return traits; |
|
|
|