-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiningroomserver.yaml
More file actions
253 lines (243 loc) · 6.99 KB
/
Copy pathdiningroomserver.yaml
File metadata and controls
253 lines (243 loc) · 6.99 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
esphome:
# esphome_core_version:
# branch: dev
name: diningroomserver
platform: ESP8266
board: nodemcuv2
on_boot:
then:
- light.turn_off:
id: dining_room_cabinet_inside_a
- light.turn_off:
id: dining_room_cabinet_inside_b
- light.turn_off:
id: dining_room_cabinet_inside_c
- light.turn_off:
id: dining_room_cabinet_inside_d
- light.turn_off:
id: dining_room_cabinet_under
switch:
- platform: restart
name: "Dining Room Cabinet Restart"
- platform: template
name: "Dining Room Cabinet Automation"
optimistic: true
id: dining_room_cabinet_automation
- platform: template
name: "Dining Room Cabinet Party Mode"
optimistic: true
id: dining_room_cabinet_party
script:
- id: autooff_left
then:
- delay: 120min # timer length
- light.turn_off:
id: dining_room_cabinet_inside_a
- light.turn_off:
id: dining_room_cabinet_inside_b
- id: autooff_right
then:
- delay: 120min # timer length
- light.turn_off:
id: dining_room_cabinet_inside_c
- light.turn_off:
id: dining_room_cabinet_inside_d
light:
- platform: fastled_clockless
chipset: WS2813
pin: D3
num_leds: 36
rgb_order: GRB
color_correct: [80%, 80%, 80%]
name: "Dining Room Cabinet Inside Left (left)"
id: dining_room_cabinet_inside_a
effects:
- addressable_rainbow:
- platform: fastled_clockless
chipset: WS2813
pin: D8
num_leds: 36
rgb_order: GRB
color_correct: [80%, 80%, 80%]
name: "Dining Room Cabinet Inside Left (right)"
id: dining_room_cabinet_inside_b
effects:
- addressable_rainbow:
- platform: fastled_clockless
chipset: WS2813
pin: D7
num_leds: 30
rgb_order: GRB
color_correct: [80%, 80%, 80%]
name: "Dining Room Cabinet Inside Right (left)"
id: dining_room_cabinet_inside_c
effects:
- addressable_rainbow:
- platform: fastled_clockless
chipset: WS2813
pin: D1
num_leds: 30
rgb_order: GRB
color_correct: [80%, 80%, 80%]
name: "Dining Room Cabinet Inside Right (right)"
id: dining_room_cabinet_inside_d
effects:
- addressable_rainbow:
- platform: fastled_clockless
chipset: WS2813
pin: D4
num_leds: 56
rgb_order: GRB
color_correct: [80%, 80%, 80%]
name: "Dining Room Cabinet Under"
id: dining_room_cabinet_under
effects:
- addressable_rainbow:
width: 200
- addressable_rainbow:
name: "Rainbow Effect Fast"
speed: 50
width: 200
- random:
name: "My Fast Random Effect"
transition_length: 4s
update_interval: 5s
- addressable_color_wipe:
- addressable_color_wipe:
name: Color Wipe Effect With Custom Values
colors:
- red: 100%
green: 100%
blue: 100%
num_leds: 30
- red: 0%
green: 0%
blue: 0%
num_leds: 30
- red: 100%
green: 0%
blue: 0%
num_leds: 30
- red: 0%
green: 100%
blue: 0%
num_leds: 30
- red: 0%
green: 0%
blue: 100%
num_leds: 30
- red: 100%
green: 100%
blue: 0%
num_leds: 30
- red: 0%
green: 100%
blue: 100%
num_leds: 30
- red: 100%
green: 0%
blue: 100%
num_leds: 30
binary_sensor:
- platform: gpio
name: "Dining Room Cabinet Left Door"
pin:
number: D2
device_class: door
id: dining_room_cabinet_door_left
# filters:
# - heartbeat: 3600s
on_release:
# if:
# condition:
# lambda: "return id(dining_room_cabinet_door_right).value == id(dining_room_cabinet_door_left).value;"
then:
- light.turn_off:
id: dining_room_cabinet_inside_a
- light.turn_off:
id: dining_room_cabinet_inside_b
# - light.turn_off:
# id: dining_room_cabinet_inside_c
# - light.turn_off:
# id: dining_room_cabinet_inside_d
- script.stop: autooff_left
on_press:
then:
- if:
condition:
switch.is_on: dining_room_cabinet_party
then:
- light.turn_on:
id: dining_room_cabinet_inside_a
brightness: 100%
effect: "rainbow"
- light.turn_on:
id: dining_room_cabinet_inside_b
brightness: 100%
effect: "rainbow"
else:
- light.turn_on:
id: dining_room_cabinet_inside_a
brightness: 80%
- light.turn_on:
id: dining_room_cabinet_inside_b
brightness: 80%
- script.stop: autooff_left
- script.execute: autooff_left
- platform: gpio
name: "Dining Room Cabinet Right Door"
pin:
number: D6
device_class: door
id: dining_room_cabinet_door_right
on_release:
then:
- light.turn_off:
id: dining_room_cabinet_inside_c
- light.turn_off:
id: dining_room_cabinet_inside_d
- script.stop: autooff_right
on_press:
then:
- if:
condition:
switch.is_on: dining_room_cabinet_party
then:
- light.turn_on:
id: dining_room_cabinet_inside_c
brightness: 100%
effect: "rainbow"
- light.turn_on:
id: dining_room_cabinet_inside_d
brightness: 100%
effect: "rainbow"
else:
- light.turn_on:
id: dining_room_cabinet_inside_c
brightness: 80%
- light.turn_on:
id: dining_room_cabinet_inside_d
brightness: 80%
- script.stop: autooff_right
- script.execute: autooff_right
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.10.80
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.10.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
mqtt:
broker: !secret MQTT_broker
username: !secret MQTT_username
password: !secret MQTT_password
discovery: True
reboot_timeout: 1h
# Enable logging
logger:
ota:
web_server:
port: 80