-
Notifications
You must be signed in to change notification settings - Fork 0
/
fireremote.yaml
432 lines (413 loc) · 11.3 KB
/
fireremote.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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
esphome:
name: fireremote
on_boot:
priority: 600.0
then:
- light.turn_on:
id: side_light
brightness: 100%
effect: Rainbow Effect
- delay: 3s
- light.turn_off:
id: side_light
esp32:
board: m5stack-fire
framework:
type: arduino
# framework:
# type: esp-idf
# version: recommended
web_server:
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: true
id: wifi_id
ap:
ssid: "${friendly_name} Fallback"
password: !secret wifi_fallback_password
external_components:
- source:
type: git
url: https://github.com/ssieb/custom_components
# type: local
# path: ../ssieb_custom_components/components
components: [ ip5306 ]
refresh: 0s
- source:
type: git
url: https://github.com/landonr/homeThing
ref: main
# type: local
# path: ../homeThing/components
components: [homeThing, homeThingDisplayState, homeThingApp, homeThingAppNowPlaying, homeThingAppSnake, homeThingAppBreakout, homeThingAppWeather]
refresh: 0s
- source:
type: git
url: https://github.com/landonr/esphome-components
ref: main
# type: local
# path: ../local_components/components
components: [
homeassistant_component,
homeassistant_media_player,
media_player_source,
media_player_source_sonos,
media_player_source_spotify,
media_player_source_custom,
UnitEncoderC
]
refresh: 0s
# - source:
# type: local
# path: ../local_components/components
# components: [
# UnitEncoderC
# ]
- source: github://pr#5254 # used to load fonts on compile
# - source: # used to load fonts on compile
# type: local
# path: ../compile-online-image/esphome/components/
components: [ font ]
refresh: 0s
packages:
home_media_player: !include homeConfig/media_player_light.yaml
weather: !include homeConfig/weather.yaml
# logger: !include ../homeThing/common/logger.yaml
# binary_sensor_rotary: !include ../homeThing/common/m5stack-fire/binary_sensor_rotary.yaml
# unit_encoder: !include ../homeThing/common/UnitEncoderC.yaml
# home_light: !include homeConfig/light.yaml
# home_switch: !include homeConfig/switch.yaml
# ip5306: !include ../homeThing/common/m5stack-fire/ip5306.yaml
# side_light: !include ../homeThing/common/m5stack-fire/sidelight.yaml
# device_base: !include ../homeThing/common/device_base.yaml
# fonts: !include ../homeThing/common/fonts.yaml
# icon_fonts: !include ../homeThing/common/icon_fonts.yaml
# images: !include ../homeThing/common/images.yaml
# settings: !include ../homeThing/common/settings.yaml
remote_package:
url: https://github.com/landonr/homeThing
ref: main
files: [
common/device_base.yaml, # defines api, ota, free memory and uptime sensor
common/fonts.yaml, # default font
common/icon_fonts.yaml, # material icons
common/m5stack-fire/ip5306.yaml, # power management and screen backlight
common/m5stack-fire/binary_sensor_rotary.yaml, # buttons
common/m5stack-fire/backlight.yaml, # backlight
common/UnitEncoderC.yaml, # encoder
common/settings.yaml, # settings screen
common/logger.yaml, # logger
# common/m5stack-fire/sidelight.yaml, # sidelight
# common/images.yaml, # boot screen image
]
refresh: 0s
substitutions:
friendly_name: "homeThingFire"
large_heavy_font_size: "24"
large_font_size: "24"
medium_font_size: "20"
small_font_size: "18"
home_thing_logo_size: "64"
material_font_large_size: "28"
material_font_small_size: "24"
text_sensor:
- platform: homeassistant
entity_id: "sensor.catfeeder_node_servings_today"
name: "Servings today"
id: servings_today
- platform: homeassistant
entity_id: "sensor.catfeeder_node_servings_total"
name: "Servings total"
id: servings_total
- platform: homeassistant
entity_id: "sensor.catfeeder_node_last_feed"
name: "Last feed"
id: last_feed
homeThingAppNowPlaying:
id: now_playing
media_player_group: media_group_component
display: my_display
display_state: display_state_id
draw_bottom_menu: true
switch:
- platform: template
id: dark_mode
name: "Dark Mode"
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
homeThingDisplayState:
id: display_state_id
font_small: small_font
font_medium: medium_font
font_large: large_font
font_large_heavy: large_heavy_font
font_material_large: material_font_large
font_material_small: material_font_small
header_height: 24
margin_size: 8
slider_margin_size: 6
scroll_bar_width: 8
bottom_bar_margin: 8
draw_battery_level: true
draw_volume_level: false
draw_header_time: true
# dark_mode: dark_mode
# homeThingAppSnake:
# id: snake
# display: my_display
# display_state: display_state_id
# homeThingAppBreakout:
# id: breakout
# display: my_display
# display_state: display_state_id
# homeThingAppWeather:
# id: weather
# display: my_display
# display_state: display_state_id
# temperature_sensor: weather_temperature
# humidity_sensor: weather_humidity
# condition_sensor: weather_state
# images:
# cloudy: weather_cloudy
# fog: weather_fog
# snow: weather_snow
# sunny: weather_sunny
# rainy: weather_rainy
# night: weather_night
light:
# - platform: homeassistant_component
# id: light_desk_lamp
# entity_id: light.desk_lamp
# name: Desk Lamp
# - platform: homeassistant_component
# id: light_rgb_lights
# entity_id: light.rgb_lights
# name: Color Lights
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: GPIO15
num_leds: 10
rmt_channel: 1
chipset: SK6812
name: "${friendly_name} Remote Light"
restore_mode: ALWAYS_OFF
id: side_light
default_transition_length: 0s
effects:
- addressable_rainbow:
name: Rainbow Effect
speed: 20
width: 15
- addressable_color_wipe:
name: Snow
colors:
- red: 100%
green: 0%
blue: 0%
num_leds: 30
- red: 100%
green: 100%
blue: 100%
num_leds: 1
add_led_interval: 100ms
reverse: true
- addressable_fireworks:
name: Fireworks Effect
update_interval: 32ms
spark_probability: 10%
use_random_color: True
fade_out_rate: 120
- addressable_scan:
name: Scan Effect
move_interval: 100ms
scan_width: 1
number:
- platform: homeassistant_component
entity_id: number.catfeeder_node_max_servings_per_day
name: cat max servings
id: cat_max_servings
min_value: 7
max_value: 15
step: 1
sensor:
- platform: homeassistant
entity_id: sensor.spin_count_for_treat
name: "Spins for Treat"
id: spin_count_for_treat
- platform: pulse_meter
pin:
number: GPIO26
# allow_other_uses: true
# inverted: true
mode:
input: true
pulldown: true
unit_of_measurement: 'RPM'
name: "${friendly_name} Wheel RPM"
id: wheel_rpm
filters:
- filter_out: NaN
- multiply: 0.5
- timeout:
timeout: 10s
value: 0
total:
unit_of_measurement: 'Revolutions Today'
id: total_rpm
name: "${friendly_name} Total RPM"
on_value:
then:
- sensor.template.publish:
id: minute_rpm
state: !lambda |-
if (id(minute_rpm).has_state() && id(minute_rpm).state > 0.0) {
return id(minute_rpm).state + 0.5;
}
return 0.5;
- platform: template
name: "${friendly_name} Spins"
# power_id: total_rpm
id: minute_rpm
unit_of_measurement: 'Revolutions'
on_value:
then:
- lambda: |-
id(homeThingMenu)->buttonPressWakeUpDisplay();
filters:
- timeout:
timeout: 15s
value: 0
homeThing:
id: homeThingMenu
header:
time_id: esptime
display: my_display
display_state: display_state_id
apps:
- now_playing
# - snake
# - breakout
# - weather
settings:
mode: rotary
display_timeout_while_charging: 30
backlight: backlight
battery:
battery_percent: battery_percent
charging: connected
boot:
api_connected: api_connected
media_players_loaded: media_players_loaded_sensor
launch_image: launch_image
on_redraw:
then:
component.update: my_display
home_screen:
name: Fire!
entities:
- id: minute_rpm
type: sensor
- id: spin_count_for_treat
type: sensor
- type: text_sensor
id: servings_today
- type: text_sensor
id: last_feed
- type: command
name: "feed lil freak"
command:
- light.turn_on:
id: side_light
brightness: 100%
effect: Rainbow Effect
- homeassistant.service:
service: button.press
data:
entity_id: "button.catfeeder_node_feed_single"
- delay: 3s
- light.turn_off:
id: side_light
- type: command
name: "feed full meal"
command:
- light.turn_on:
id: side_light
brightness: 100%
effect: Rainbow Effect
- homeassistant.service:
service: button.press
data:
entity_id: "button.catfeeder_node_feed_meal"
- delay: 3s
- light.turn_off:
id: side_light
- type: text_sensor
id: servings_total
- type: number
id: cat_max_servings
screens:
# - name: Lights Screen
# entities:
# - id: light_rgb_lights
# type: light
# - id: light_desk_lamp
# type: light
# # - id: strip_light
# # type: light
# - id: side_light
# type: light
# - type: command
# name: "color lights"
# command:
# - homeassistant.service:
# service: script.colors
# - type: command
# name: "hell lights"
# command:
# - homeassistant.service:
# service: scene.turn_on
# data:
# entity_id: "scene.hell"
# - type: command
# name: "lights off"
# command:
# - homeassistant.service:
# service: script.off_script
- name: Settings Screen
show_version: True
entities:
- type: number
id: cat_max_servings
- id: dark_mode
type: switch
- id: side_light
type: light
- id: backlight
type: light
# settings.yaml
- id: "restart_switch"
type: switch
- id: wifi_ssid
type: text_sensor
- id: wifi_signal_percent
type: sensor
- id: wifi_ip
type: text_sensor
spi:
clk_pin: 18
mosi_pin: 23
miso_pin: 19
display:
- platform: ili9xxx
model: M5STACK
cs_pin: 14
dc_pin: 27
reset_pin: 33
id: my_display
update_interval: 3600s
lambda: |-
id(homeThingMenu)->draw_menu_screen();
return;