48 lines
1.2 KiB
YAML
48 lines
1.2 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_color_wipe:
|
|
# name: "Wipe In-green"
|
|
# colors:
|
|
# - red: 0%
|
|
# green: 100%
|
|
# blue: 0%
|
|
# num_leds: 6
|
|
# gradient: true
|
|
# add_led_interval: 25714ms
|
|
# reverse: false
|
|
|
|
|
|
- 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;
|
|
} |