Fix addressable light control without transitions & effects with transitions (#2187)

This commit is contained in:
Oxan van Leeuwen 2021-08-23 10:44:24 +02:00 committed by GitHub
parent d71996e58d
commit 518c271eba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,9 +45,14 @@ void AddressableLight::update_state(LightState *state) {
// don't use LightState helper, gamma correction+brightness is handled by ESPColorView
this->all() = esp_color_from_light_color_values(val);
this->schedule_show();
}
void AddressableLightTransformer::start() {
// don't try to transition over running effects.
if (this->light_.is_effect_active())
return;
auto end_values = this->target_values_;
this->target_color_ = esp_color_from_light_color_values(end_values);