backup 20240718
This commit is contained in:
48
esphome/templates/light_neopixel.yaml
Normal file
48
esphome/templates/light_neopixel.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user