Hello. I write no-repetitive effect for ws2811. After end i need to turn off light, no just set all to black, but completely turn off.
Now i do this in HA automation with delay. But i hope exist method, that do something similar
auto call = id(YOUR_LIGHT_ID).turn_off();
This i my code,
It first change the LED color to black down the strip,
when all led is black it turns off the light completely.
- addressable_lambda:
name: "WipeOFFup"
update_interval: 50ms
lambda: |-
static int steps = 0;
static int led = 0;
if (steps >=0 && steps <= it.size()) {
it[led] = Color::BLACK;
led += 1;
steps += 1;
} else {
auto call = id(YOUR_LIGHT_ID).turn_off();
call.perform();
steps = 0;
led = 0;
}
2 Likes