mirror of
https://github.com/esphome/esphome.git
synced 2025-09-28 08:02:23 +01:00
[light] Add transition_length to strobe effect. (#6595)
This commit is contained in:
@@ -150,6 +150,7 @@ class AutomationLightEffect : public LightEffect {
|
||||
struct StrobeLightEffectColor {
|
||||
LightColorValues color;
|
||||
uint32_t duration;
|
||||
uint32_t transition_length;
|
||||
};
|
||||
|
||||
class StrobeLightEffect : public LightEffect {
|
||||
@@ -174,7 +175,7 @@ class StrobeLightEffect : public LightEffect {
|
||||
}
|
||||
call.set_publish(false);
|
||||
call.set_save(false);
|
||||
call.set_transition_length_if_supported(0);
|
||||
call.set_transition_length_if_supported(this->colors_[this->at_color_].transition_length);
|
||||
call.perform();
|
||||
this->last_switch_ = now;
|
||||
}
|
||||
|
Reference in New Issue
Block a user