Created
May 23, 2019 21:49
-
-
Save pauly7300/7fc9f50c7b8f7606abf40b38cba73294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: quin_dig_uno1 | |
platform: ESP32 | |
board: mhetesp32minikit | |
wifi: | |
ssid: 'MYSSID' | |
password: '*******' | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
password: '********' | |
ota: | |
password: '********' | |
web_server: | |
port: 80 | |
light: | |
- platform: fastled_clockless | |
chipset: ws2812b | |
rgb_order: GRB | |
pin: GPIO3 | |
num_leds: 5 | |
name: "quin_dig_uno1" | |
id: quin_dig | |
effects: | |
- flicker: | |
- flicker: | |
name: Flicker Effect With Custom Values | |
alpha: 95% | |
intensity: 1.5% | |
- lambda: | |
name: My Custom Effect | |
update_interval: 1s | |
lambda: |- | |
static int state = 0; | |
auto call = id(quin_dig).turn_on(); | |
// Transtion of 1000ms = 1s | |
call.set_transition_length(1000); | |
if (state == 0) { | |
call.set_rgb(1.0, 1.0, 1.0); | |
} else if (state == 1) { | |
call.set_rgb(1.0, 0.0, 1.0); | |
} else if (state == 2) { | |
call.set_rgb(0.0, 0.0, 1.0); | |
} else { | |
call.set_rgb(1.0, 0.0, 0.0); | |
} | |
call.perform(); | |
state += 1; | |
if (state == 4) | |
state = 0; | |
- addressable_rainbow: | |
- addressable_rainbow: | |
name: Rainbow Effect With Custom Values | |
speed: 10 | |
width: 50 | |
- addressable_color_wipe: | |
- addressable_color_wipe: | |
name: Color Wipe Effect With Custom Values | |
colors: | |
- red: 100% | |
green: 100% | |
blue: 100% | |
num_leds: 1 | |
- red: 0% | |
green: 0% | |
blue: 0% | |
num_leds: 1 | |
add_led_interval: 100ms | |
reverse: False | |
- addressable_scan: | |
- addressable_scan: | |
name: Scan Effect With Custom Values | |
move_interval: 100ms | |
- addressable_lambda: | |
name: "My Custom Effect lam" | |
update_interval: 20ms | |
lambda: |- | |
// it.size() - Number of LEDs | |
// it[num] - Access the LED at index num. | |
// Set the LED at num to the given r, g, b values | |
// it[num] = light::ESPColor(r, g, b); | |
// Get the color at index num (ESPColor instance) | |
// it[num].get(); | |
// Example: Simple color wipe | |
for (int i = 1; i < it.size(); i++) { | |
it[i] = it[i - 1].get(); | |
} | |
it[0] = light::ESPColor::random_color(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment