mirror of
https://github.com/esphome/esphome.git
synced 2026-10-11 13:54:12 +00:00
[addressable_light] Clear white channel when setting HSV color (#20265)
This commit is contained in:
@@ -19,10 +19,7 @@ class ESPColorSettable {
|
||||
virtual void lighten(uint8_t delta) = 0;
|
||||
virtual void darken(uint8_t delta) = 0;
|
||||
void set(const ESPHSVColor &color) { this->set_hsv(color); }
|
||||
void set_hsv(const ESPHSVColor &color) {
|
||||
Color rgb = color.to_rgb();
|
||||
this->set_rgb(rgb.r, rgb.g, rgb.b);
|
||||
}
|
||||
void set_hsv(const ESPHSVColor &color) { this->set(color.to_rgb()); }
|
||||
void set_rgb(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
this->set_red(red);
|
||||
this->set_green(green);
|
||||
|
||||
Reference in New Issue
Block a user