Files
hassos_config/esphome/templates/light_neopixel.yaml
2025-06-23 12:40:35 +02:00

45 lines
1.1 KiB
YAML

---
light:
- platform: neopixelbus
type: GRB
variant: WS2812
pin: ${pin_led1}
num_leds: ${num_leds}
name: ${device_name}_leds
effects:
- addressable_lambda:
name: "Wipe In-green"
update_interval: 25714ms
lambda: |-
static int x = 0;
if (initial_run) {
x = 0;
it[x] = Color(0,255,0);
}
if (x < it.size()) {
it.range(1, x) = Color(0,255,0);
x += 1;
}
- addressable_lambda:
name: star-orange
update_interval: 12ms
lambda: |-
static int x = 0;
if (initial_run) {
x = 0;
it.all() = Color::BLACK;
}
if (x < it.size()) {
it[x] = COLOR_CSS_ORANGE;
x += 5;
}
- random:
name: "Random"
transition_length: 4s
update_interval: 5s
- addressable_rainbow:
name: Rainbow Effect
speed: 100
width: 50
- addressable_flicker: