1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-28 08:02:23 +01:00

Remove double scheduling from addressable lights (#1963)

This commit is contained in:
Oxan van Leeuwen
2021-08-23 10:00:38 +02:00
committed by GitHub
parent 5ec9bb0fb5
commit 2f33cd2db5
12 changed files with 57 additions and 45 deletions

View File

@@ -42,6 +42,7 @@ void WLEDLightEffect::blank_all_leds_(light::AddressableLight &it) {
for (int led = it.size(); led-- > 0;) {
it[led].set(Color::BLACK);
}
it.schedule_show();
}
void WLEDLightEffect::apply(light::AddressableLight &it, const Color &current_color) {
@@ -134,6 +135,7 @@ bool WLEDLightEffect::parse_frame_(light::AddressableLight &it, const uint8_t *p
blank_at_ = millis() + DEFAULT_BLANK_TIME;
}
it.schedule_show();
return true;
}