mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-01 02:28:28 +02:00
Apply color brightness to addressable light effects (#2321)
This commit is contained in:
committed by
Jesse Hills
parent
e3ffecefc0
commit
d180aee57f
@@ -38,11 +38,8 @@ class AddressableLightEffect : public LightEffect {
|
||||
void stop() override { this->get_addressable_()->set_effect_active(false); }
|
||||
virtual void apply(AddressableLight &it, const Color ¤t_color) = 0;
|
||||
void apply() override {
|
||||
LightColorValues color = this->state_->remote_values;
|
||||
// not using any color correction etc. that will be handled by the addressable layer
|
||||
Color current_color =
|
||||
Color(static_cast<uint8_t>(color.get_red() * 255), static_cast<uint8_t>(color.get_green() * 255),
|
||||
static_cast<uint8_t>(color.get_blue() * 255), static_cast<uint8_t>(color.get_white() * 255));
|
||||
// not using any color correction etc. that will be handled by the addressable layer through ESPColorCorrection
|
||||
Color current_color = color_from_light_color_values(this->state_->remote_values);
|
||||
this->apply(*this->get_addressable_(), current_color);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user