Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- light:
- - platform: neopixelbus
- name: "Entrance LED"
- id: light_addressable
- icon: "mdi:led-strip-variant"
- pin: GPIO3
- num_leds: 21
- variant: SK6812
- type: GRBW
- method:
- type: esp8266_dma
- effects:
- - random:
- name: "Random"
- - pulse:
- name: "Pulse"
- - strobe:
- name: "Strobe"
- - flicker:
- name: "Flicker"
- - addressable_rainbow:
- name: "Rainbow"
- - addressable_color_wipe:
- name: "Color wipe"
- - addressable_scan:
- name: "Scan"
- - addressable_twinkle:
- name: "Twinkle"
- - addressable_fireworks:
- name: "Fireworks"
- - addressable_flicker:
- name: "Addressable flicker"
- - addressable_random_twinkle:
- name: "Addressable Random Twinkle"
- - addressable_lambda:
- name: "Startup effect"
- update_interval: 32ms
- lambda: |-
- static uint16_t progress = 0;
- if (initial_run) {
- it.all() = Color::BLACK;
- progress = it.size();
- return;
- }
- if(progress > 0) {
- progress--;
- it.range(progress, it.size()) = current_color;
- }
- - addressable_lambda:
- name: "Shutdown effect"
- update_interval: 32ms
- lambda: |-
- static uint16_t progress = 0;
- if (initial_run) {
- progress = 0;
- return;
- }
- if(progress < it.size()) {
- progress++;
- it.range(0, progress) = Color::BLACK;
- }
- on_state:
- then:
- - if:
- condition:
- lambda: |-
- return id(light_addressable).get_effect_name() == "Shutdown effect";
- then:
- - delay: 800ms
- - light.turn_off:
- id: light_addressable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement