Browse Source

init

master
Thomas 5 years ago
commit
f8989102f4
Signed by: taschenbier
GPG Key ID: 306F574D34A9673B
  1. 132
      gitarre.yaml

132
gitarre.yaml

@ -0,0 +1,132 @@
<<: !include secrets.yaml
esphome:
name: tmechen_esphome_
platform: ESP8266
board: d1_mini
on_boot:
priority: 100 # Highest priority, ensures light turns on without delay.
then:
- light.turn_on:
brightness: 100%
red: 100%
green: 0%
blue: 0
id: gitarre
effect: rainbow
logger:
light:
- platform: neopixelbus
id: gitarre
variant: WS2812X
pin: GPIO3
num_leds: 61
name: "Gitarre"
effects:
- addressable_rainbow:
name: rainbow
speed: 50
width: 20
- addressable_scan:
name: kitt
move_interval: 20ms
scan_width: 5
- addressable_color_wipe:
name: test
colors:
- red: 100%
green: 100%
blue: 100%
num_leds: 3
- red: 0%
green: 0%
blue: 0%
num_leds: 3
add_led_interval: 100ms
reverse: False
- strobe:
name: strobe
colors:
- state: true
brightness: 100%
red: 100%
green: 100%
blue: 100%
duration: 20ms
- state: False
duration: 20ms
- flicker:
alpha: 5%
intensity: 100%
- addressable_twinkle:
name: twinkle
twinkle_probability: 99%
progress_interval: 3ms
- addressable_lambda:
name: bluez
lambda: |-
for (int i = 0; i < it.size(); i+=10) {
it[i] = light::ESPColor(255, 255, 255);
}
for (int i = 1; i < it.size(); i+=10) {
it[i] = light::ESPColor(255, 255, 255);
}
for (int i = 2; i < it.size(); i+=10) {
it[i] = light::ESPColor(238, 0, 255);
}
for (int i = 3; i < it.size(); i+=10) {
it[i] = light::ESPColor(238, 0, 255);
}
for (int i = 4; i < it.size(); i+=10) {
it[i] = light::ESPColor(255, 157, 0);
}
for (int i = 5; i < it.size(); i+=10) {
it[i] = light::ESPColor(255, 157, 0);
}
for (int i = 6; i < it.size(); i+=10) {
it[i] = light::ESPColor(0, 28, 209);
}
for (int i = 7; i < it.size(); i+=10) {
it[i] = light::ESPColor(0, 28, 209);
}
for (int i = 8; i < it.size(); i+=10) {
it[i] = light::ESPColor(183, 255, 0);
}
for (int i = 9; i < it.size(); i+=10) {
it[i] = light::ESPColor(183, 255, 0);
}
- lambda:
name: lambda
update_interval: 1s
lambda: |-
static int state = 0;
auto call = id(gitarre).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;
Loading…
Cancel
Save