mirror of
https://github.com/esphome/esphome.git
synced 2024-11-14 02:58:11 +01:00
Fix addressable light control without transitions & effects with transitions (#2187)
This commit is contained in:
parent
3869e56521
commit
ad953f02d1
1 changed files with 5 additions and 0 deletions
|
@ -46,9 +46,14 @@ void AddressableLight::write_state(LightState *state) {
|
||||||
|
|
||||||
// don't use LightState helper, gamma correction+brightness is handled by ESPColorView
|
// don't use LightState helper, gamma correction+brightness is handled by ESPColorView
|
||||||
this->all() = esp_color_from_light_color_values(val);
|
this->all() = esp_color_from_light_color_values(val);
|
||||||
|
this->schedule_show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressableLightTransformer::start() {
|
void AddressableLightTransformer::start() {
|
||||||
|
// don't try to transition over running effects.
|
||||||
|
if (this->light_.is_effect_active())
|
||||||
|
return;
|
||||||
|
|
||||||
auto end_values = this->target_values_;
|
auto end_values = this->target_values_;
|
||||||
this->target_color_ = esp_color_from_light_color_values(end_values);
|
this->target_color_ = esp_color_from_light_color_values(end_values);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue