-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdominogatelights.yaml
86 lines (85 loc) · 2.66 KB
/
dominogatelights.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Configuration
substitutions:
name: "dominogatelights"
friendly_name: "Gate Lights"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
# TRUE if using same firmware for other devices like this
name_add_mac_suffix: false
project:
name: "HomeConnected.Domino_Gate_Lights"
version: "2024.6.12"
esp8266:
board: d1_mini
logger:
api:
ota:
dashboard_import:
import_full_config: true
package_import_url: github://laptopology/Domino-Gate-Lights/dominogatelights.yaml@main
wifi:
ap:
password: "123456789"
captive_portal:
# Components
light:
- platform: neopixelbus
variant: ws2812
type: GRB
pin: D7 # GPIO3
num_leds: 26
internal: True
id: domino_strip
- platform: partition
name: "Inside Light"
segments:
- id: domino_strip
from: 0
to: 9
effects:
- strobe:
- pulse:
- addressable_scan:
- addressable_lambda:
name: "Police"
update_interval: 50ms
lambda: |-
static uint16_t pos = 0;
if (pos < it.size() / 2) {
it.range(pos, pos + it.size() / 2) = Color(255, 0, 0); //fill red
it.range(0, pos) = Color(0, 0, 255); //fill blue
it.range(pos + it.size() / 2, it.size()) = Color(0, 0, 255); //fill blue
} else {
it.range(pos - it.size() / 2, pos) = Color(0, 0, 255); //fill blue
it.range(0, pos - it.size() / 2) = Color(255, 0, 0); //fill red
it.range(pos, it.size()) = Color(255, 0, 0); //fill red
}
pos++;
if (pos >= it.size()) pos = 0; //rollover
- platform: partition
name: "Outside Light"
segments:
- id: domino_strip
from: 10
to: 25
effects:
- strobe:
- pulse:
- addressable_scan:
- addressable_lambda:
name: "Police"
update_interval: 50ms
lambda: |-
static uint16_t pos = 0;
if (pos < it.size() / 2) {
it.range(pos, pos + it.size() / 2) = Color(255, 0, 0); //fill red
it.range(0, pos) = Color(0, 0, 255); //fill blue
it.range(pos + it.size() / 2, it.size()) = Color(0, 0, 255); //fill blue
} else {
it.range(pos - it.size() / 2, pos) = Color(0, 0, 255); //fill blue
it.range(0, pos - it.size() / 2) = Color(255, 0, 0); //fill red
it.range(pos, it.size()) = Color(255, 0, 0); //fill red
}
pos++;
if (pos >= it.size()) pos = 0; //rollover