-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmirabella_genio_nebula.yaml
245 lines (218 loc) · 5.64 KB
/
mirabella_genio_nebula.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
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
# -------------------------------------
# ---- Implemented on Nebula ----
# GPIO15 has a 4k to GND
# -------------------------------------
substitutions:
devicename: mirabella_genio_nebula
esphome:
name: ${devicename}
platform: ESP8266
board: esp07 # https://registry.platformio.org/platforms/platformio/espressif8266/boards
wifi:
#power_save_mode: light # power reduced from ?.?w to ?.?w
#fast_connect: true
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
hidden: True
manual_ip:
static_ip: !secret ip_mirabella_genio_nebula
gateway: !secret ip_gateway
subnet: 255.255.255.0
domain: .homelan
# BELOW Is disabled due to memory size crashes!!!
# ap: # Enable fallback hotspot (captive portal) in case wifi connection fails
# ssid: "${devicename} Hotspot"
# password: !secret password
#
#captive_portal:
# Enable logging
logger:
# level: VERBOSE
# Enable Home Assistant API
api:
reboot_timeout: 0s # Dont reboot..
encryption:
key: !secret encryption_key
# password: !secret password #Because the encription is causing memory issues???
ota:
password: !secret password
web_server:
port: 80
auth:
username: admin
password: !secret password
output:
- platform: esp8266_pwm
pin: GPIO4
frequency: 1000 Hz
inverted: true
id: pwm_red
- platform: esp8266_pwm
pin: GPIO12
frequency: 1000 Hz
inverted: true
id: pwm_green
- platform: esp8266_pwm
pin: GPIO14
frequency: 1000 Hz
inverted: true
id: pwm_blue
- platform: esp8266_pwm
pin: GPIO13
frequency: 1000 Hz
# max_power: 0.2
# min_power: 0.5 always running
id: pwm_motor
- platform: esp8266_pwm
pin: GPIO5
frequency: 1000 Hz
inverted: true
# max_power: 0.4
id: pwm_lazer
- platform: esp8266_pwm
pin: GPIO0
frequency: 1000 Hz
inverted: true
id: pwm_0
light:
- platform: rgb
id: mainlight
name: "${devicename} Light"
red: pwm_red
green: pwm_green
blue: pwm_blue
# needs effect to SLOWLY change colors..
effects:
- random:
- random:
name: "Fast Random"
transition_length: 4s
update_interval: 5s
- random:
name: "Slow Random"
transition_length: 30s
update_interval: 30s
- random:
name: "Really Slow Random"
transition_length: 90s
update_interval: 90s
- strobe:
name: "Slow RGB"
colors:
- state: True
red: 100%
green: 0%
blue: 0%
duration: 5000ms
- state: True
red: 0%
green: 100%
blue: 0%
duration: 5000ms
- state: True
red: 0%
green: 0%
blue: 100%
duration: 5000ms
- flicker:
name: Flicker
alpha: 95%
intensity: 2.5%
- platform: monochromatic
id: lazerlight
output: pwm_lazer
name: "${devicename} Lazer"
- platform: monochromatic
id: motorlight
name: "${devicename} Motor"
output: pwm_motor
#icon: "mdi:motor??"
- platform: monochromatic
id: buttonlight
name: "${devicename} Button"
output: pwm_0
binary_sensor:
- platform: gpio
id: sidebutton
pin:
number: GPIO2
inverted: yes
name: "${devicename} Button"
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
if:
condition:
light.is_on: buttonlight
then:
- light.turn_off: mainlight
- light.turn_off: buttonlight
- light.turn_off: lazerlight
- light.turn_off: motorlight
else:
- light.turn_on: buttonlight
- light.turn_on:
id: mainlight
brightness: 50%
effect: "Slow Random"
- light.turn_on:
id: motorlight
brightness: 60%
- delay: 1h
- light.turn_off: mainlight
- light.turn_off: buttonlight
- light.turn_off: lazerlight
- light.turn_off: motorlight
- timing:
- ON for at most 1s
- OFF for at most 1s
- ON for at most 1s
- OFF for at most 1s
- ON for at most 1s
- OFF for at least 0.5s
then:
- light.turn_on: buttonlight
- light.turn_on:
id: mainlight
brightness: 50%
effect: "Slow Random"
- light.turn_on:
id: motorlight
brightness: 60%
- light.turn_on:
id: lazerlight
brightness: 63%
- delay: 1h
- light.turn_off: mainlight
- light.turn_off: buttonlight
- light.turn_off: lazerlight
- light.turn_off: motorlight
- timing:
- ON for at most 1s
- OFF for at most 1s
- ON for at most 1s
- OFF for at most 1s
- ON for at most 1s
- OFF for at most 1s
- ON for at most 1s
- OFF for at least 0.5s
then:
- light.turn_on: buttonlight
- light.turn_on:
id: motorlight
brightness: 60%
- light.turn_on:
id: lazerlight
brightness: 63%
- delay: 1h
- light.turn_off: mainlight
- light.turn_off: buttonlight
- light.turn_off: lazerlight
- light.turn_off: motorlight
status_led:
pin:
number: GPIO15
inverted: yes