Help with neopixel bus effects and lambda

Hello
i’m having some trouble so any help would be much appreciated, I’ve read the docs and still feel i’m missing something
i am using the neopixel bus component on esphome with rgbw 5v led strip and 178 pixels all working fine.

but i cant figure out how to make a custom effect to turn off 50 leds somewhere in the middle with the example below i can turn off 1 led. pixel 122, I’ve tried replacing the 122 with a few things but obviously the wrong format as it does nothing.

  • addressable_lambda:
    name: turn off pixels
    lambda: |-
    it[122] = light::ESPColor(0,0,0,0);

secondly as i would like to build some custom effects of my own does any one know where i can learn how to use lambda for this purpose.

1 Like