mirror of
https://github.com/esphome/esphome.git
synced 2025-10-27 05:03:48 +00:00
Addressable light transition (#750)
* Improve addressable light transition behavior Fixes https://github.com/esphome/issues/issues/555 * Improve addressable flicker effect See also https://github.com/esphome/feature-requests/issues/348 * Update addressable_light_effect.h * Refactor * Format * Prevent divide by zero * Fixes
This commit is contained in:
@@ -463,7 +463,7 @@ LightColorValues LightCall::validate_() {
|
||||
this->transition_length_.reset();
|
||||
}
|
||||
|
||||
if (!this->has_transition_() && !this->has_flash_() && !this->has_effect_() && supports_transition) {
|
||||
if (!this->has_transition_() && !this->has_flash_() && (!this->has_effect_() || *this->effect_ == 0) && supports_transition) {
|
||||
// nothing specified and light supports transitions, set default transition length
|
||||
this->transition_length_ = this->parent_->default_transition_length_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user