-
Notifications
You must be signed in to change notification settings - Fork 0
/
lilygos3.yaml
330 lines (308 loc) · 9.03 KB
/
lilygos3.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
esphome:
name: "lilygos3"
platformio_options:
board_build.f_flash: 80000000L
board_build.partitions: default_16MB.csv
board_build.arduino.memory_type: qio_opi
on_boot:
then:
- delay: 5s
- light.turn_on:
id: backlight
brightness: 100%
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
framework:
type: arduino
flash_size: 16MB
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "S3 Fallback Hotspot"
password: "zQ9tuPKIfFMu"
external_components:
- source:
type: git
url: https://github.com/landonr/homeThing
ref: main
# type: local
# path: ../homething/components
components: [homeThing, homeThingDisplayState, homeThingApp, homeThingAppNowPlaying, homeThingAppSnake, homeThingAppCatToy, homeThingAppBreakout ]
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
]
refresh: 0s
- source:
type: git
url: https://github.com/landonr/lilygo-tdisplays3-esphome/
ref: v0.1
refresh: 1d
components: [tdisplays3]
# - source: github://pr#5214
# - source: # used to load images on compile
# type: local
# path: ../compile-online-image/esphome/components/
# components: [ image ]
# refresh: 0s
- source: github://pr#5254
# - 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.yaml
home_switch: !include homeConfig/switch.yaml
# images: !include ../homeThing/common/images.yaml
# device_base: !include ../homeThing/common/device_base.yaml
# fonts: !include ../homeThing/common/fonts-local.yaml
# icon_fonts: !include ../homeThing/common/icon_fonts-local.yaml
# ipod_control_binary_sensor: !include ../homeThing/common/ipod/lilygo_tdisplay_ipod_binary_sensor.yaml
# ipod_control_rotary: !include ../homeThing/common/ipod/lilygo_tdisplay_ipod_rotary.yaml
# ipod_control_battery: !include ../homeThing/common/ipod/lilygo_tdisplay_ipod_battery.yaml
# ipod_control_sleep: !include ../homeThing/common/ipod/lilygo_tdisplay_ipod_sleep.yaml
# s3_backlight: !include ../homeThing/common/tdisplay-s3/backlight.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-local.yaml, # default font
common/icon_fonts-local.yaml, # material icons
common/ipod/lilygo_tdisplay_ipod_battery.yaml, # used for battery percent
common/ipod/lilygo_tdisplay_ipod_binary_sensor.yaml, # used for button controls
common/ipod/lilygo_tdisplay_ipod_rotary.yaml, # used for rotary controls
common/ipod/lilygo_tdisplay_ipod_sleep.yaml, # required for device to sleep
common/tdisplay-s3/backlight.yaml, # backlight
common/settings.yaml, # settings screen
# common/images.yaml # boot screen image
]
refresh: 0s
substitutions:
friendly_name: "s3 homething"
# rotary_left_pin: "11"
# rotary_right_pin: "13"
# rotary_up_pin: "10"
# rotary_down_pin: "12"
# rotary_select_pin: "3"
# rotary_pin_a: "1"
# rotary_pin_b: "2"
rotary_left_pin: "GPIO1" # sw5
rotary_right_pin: "GPIO3" #sw3
rotary_up_pin: "GPIO2" # sw4
rotary_down_pin: "GPIO10" # sw2
rotary_select_pin: "GPIO11" # sw1
rotary_pin_a: "GPIO13"
rotary_pin_b: "GPIO12"
screen_left_pin: "GPIO0"
screen_right_pin: "GPIO14"
battery_pin: "4"
log_level: "INFO"
remote_transmitter:
pin: GPIO21
# Infrared remotes use a 50% carrier signal
carrier_duty_percent: 50%
id: infrared
image:
id: launch_image
# file: "https://raw.githubusercontent.com/landonr/homeThing/main/docs/homeThingLogo.svg"
file: "https://raw.githubusercontent.com/landonr/homeThing/main/docs/lights.jpg"
# file: "http://cloud.ine.ru/s/JDbPr6W4QXnXKgo/download"
# file: "http://172.16.1.67:8123/api/media_player_proxy/media_player.beam?token=a955fc758234e7ac5d9e484b5dc401970113a347dc2de2c5f4f1a70ab4fde614&cache=45ec98127e9e4fe0"
resize: 48x48
type: TRANSPARENT_BINARY
light:
- platform: homeassistant_component
id: light_desk_lamp
entity_id: light.desk_lamp
name: Desk Lamp
- platform: homeassistant_component
id: light_all_lights
entity_id: light.all_lights
name: All Lights
- platform: homeassistant_component
id: light_rgb_lights
entity_id: light.rgb_lights
name: Color Lights
display:
- platform: tdisplays3
id: my_display
rotation: 180
update_interval: 60s
lambda: |-
id(homeThingMenu)->draw_menu_screen();
return;
cover:
- platform: homeassistant_component
entity_id: "cover.megadesk_cover"
name: "Megadesk"
id: cover_megadesk
text_sensor:
- platform: homeassistant
entity_id: "sensor.particulate_matter_2_5um_concentration"
name: "Air Quality"
id: air_quality
switch:
- platform: homeassistant_component
entity_id: "switch.oven_fan"
name: "Oven Fan"
id: oven_fan
- platform: template
id: dark_mode
name: "Dark Mode"
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
homeThingDisplayState:
id: display_state_id
draw_battery_level: true
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
dark_mode: dark_mode
homeThingAppNowPlaying:
id: now_playing
media_player_group: media_group_component
display: my_display
display_state: display_state_id
homeThingAppSnake:
id: snake
display: my_display
display_state: display_state_id
homeThingAppCatToy:
id: cat_toy
remote_transmitter: infrared
display: my_display
display_state: display_state_id
homeThingAppBreakout:
id: breakout
display: my_display
display_state: display_state_id
homeThing:
id: homeThingMenu
apps:
- now_playing
- breakout
- snake
- cat_toy
settings:
sleep_after: 14400
backlight: backlight
header:
time_id: esptime
sleep_switch: sleep_toggle
battery:
battery_percent: battery_percent
charging: charging
display: my_display
on_redraw:
then:
component.update: my_display
display_state: display_state_id
boot:
api_connected: api_connected
media_players_loaded: media_players_loaded_sensor
launch_image: launch_image
home_screen:
name: root
entities:
- id: dark_mode
type: switch
- id: light_rgb_lights
type: light
- type: command
name: "feed lil freak"
command:
- homeassistant.service:
service: button.press
data:
entity_id: "button.catfeeder_node_feed_single"
- type: text_sensor
id: air_quality
- type: switch
id: oven_fan
screens:
- name: Desk Screen
entities:
- type: cover
id: cover_megadesk
- type: command
name: "desk nudge up"
command:
- homeassistant.service:
service: button.press
data:
entity_id: "button.desk_position_nudge_down"
- type: command
name: "desk nudge down"
command:
- homeassistant.service:
service: button.press
data:
entity_id: "button.desk_position_nudge_down"
- id: light_desk_lamp
type: light
- name: Lights Screen
entities:
- id: light_all_lights
type: light
- id: light_rgb_lights
type: light
- type: command
name: "color scene"
command:
- homeassistant.service:
service: script.warm
- type: command
name: "auto scene"
command:
- homeassistant.service:
service: script.auto
- type: command
name: "hell scene"
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:
- id: backlight
type: light
- id: restart_switch
type: switch
- id: wifi_ssid
type: text_sensor
- id: wifi_signal_percent
type: sensor
- id: wifi_ip
type: text_sensor