-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
tdisplay-s3.yaml
370 lines (336 loc) · 9.35 KB
/
tdisplay-s3.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
esphome:
name: "tdisplay-s3"
platformio_options:
board_build.f_flash: 80000000L
board_build.partitions: default_16MB.csv
board_build.arduino.memory_type: qio_opi
on_boot:
then:
- delay: 0.5s
- light.turn_on:
id: backlight
brightness: 100%
transition_length: 0.5s
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
framework:
type: arduino
flash_size: 16MB
external_components:
- source: github://landonr/[email protected]
components: [tdisplays3]
refresh: 0s
- source: github://landonr/homeThing@main #update_to_head_ref
# - source:
# type: local
# path: components
refresh: 0s
components: [homeThing, homeThingDisplayState, homeThingApp, homeThingAppNowPlaying, homeThingAppSnake, homeThingAppCatToy, homeThingAppBreakout, homeThingAppWeather]
- source:
type: git
url: https://github.com/landonr/esphome-components
ref: main
refresh: 0s
components: [
homeassistant_component,
homeassistant_media_player,
media_player_source,
media_player_source_sonos,
media_player_source_spotify,
media_player_source_custom
]
- source: github://pr#4710 # for media player image
components: [ online_image ]
packages:
# common
device_base: github://landonr/homeThing/common/device_base.yaml@main
fonts: github://landonr/homeThing/common/fonts.yaml@main
icon_fonts: github://landonr/homeThing/common/icon_fonts.yaml@main
settings: github://landonr/homeThing/common/settings.yaml@main
images: github://landonr/homeThing/common/images.yaml@main
nowPlayingImage: github://landonr/homeThing/common/nowPlayingImage.yaml@main
voice_assistant: github://landonr/homeThing/common/voice_assistant.yaml@main
# ipod
battery: github://landonr/homeThing/common/ipod/lilygo_tdisplay_ipod_battery.yaml@main
sleep: github://landonr/homeThing/common/ipod/lilygo_tdisplay_ipod_sleep.yaml@main
rotary: github://landonr/homeThing/common/ipod/lilygo_tdisplay_ipod_rotary.yaml@main
#tdisplay s3
backlight: github://landonr/homeThing/common/tdisplay-s3/backlight.yaml@main
binary_sensors: github://landonr/homeThing/common/tdisplay-s3/lilygo_tdisplay_ipod_binary_sensor_pcf.yaml@main
# rotary_seesaaw: !include github://landonr/homeThing/common/tdisplay-s3/lilygo_tdisplay_ipod_rotary_seesaw.yaml@main
# binary_sensor_seesaw: !include github://landonr/homeThing/common/tdisplay-s3/lilygo_tdisplay_ipod_binary_sensor_seesaw.yaml@main
substitutions:
friendly_name: "homeThing S3"
rotary_pin_a: "10"
rotary_pin_b: "11"
medium_font_size: "16"
battery_pin: "4"
# common/nowPlayingImage.yaml
online_image_id: "media_player_image"
online_image_initial_url: "http://172.16.1.23:8080/insecure/rs:fill:170:170/"
online_image_text_sensor_id: "entity_picture"
online_image_text_sensor_entity_id: "sensor.beam_picture_proxy"
online_image_display_id: "my_display"
light: # home assistant lights
- platform: homeassistant_component
id: light_all_lights
entity_id: light.all_lights
name: All Lights
# plugged into Stemma QT port
- platform: esp32_rmt_led_strip
chipset: WS2812
rgb_order: RGB
pin: GPIO43
num_leds: 42
rmt_channel: 2
name: "${friendly_name} Strip Light"
restore_mode: RESTORE_DEFAULT_OFF
id: strip_light
default_transition_length: 0s
effects:
- addressable_rainbow:
name: Rainbow Effect
speed: 10
width: 50
### Media Players
media_player_source_sonos: # sonos favorite source
id: sonos
media_player: # home assistant media players
- platform: homeassistant_media_player
name: Beam
entity_id: "media_player.beam"
id: media_player_beam
type: speaker
sources:
- id: sonos
type: sonos
- platform: homeassistant_media_player
name: TV
entity_id: "media_player.55_tcl_roku_tv"
id: media_player_tv
type: roku
soundbar:
speaker: media_player_beam
homeassistant_media_player: # media player menu
id: media_group_component
finished_loading:
id: media_players_loaded_sensor
active_player:
id: active_player
name: "${friendly_name} Active Player"
media_players:
- id: media_player_beam
type: speaker
- id: media_player_tv
type: roku
homeThingAppNowPlaying:
display: my_display
display_state: display_state_id
id: now_playing
media_player_group: media_group_component
now_playing_image: media_player_image
### Covers / Smart Desk
number: # home assistant number
- platform: homeassistant_component
entity_id: number.desk_height_cm
name: desk height
id: desk_height_number
min_value: 61.0
max_value: 105.0
step: 1
cover: # home assistant cover
- platform: homeassistant_component
entity_id: "cover.megadesk_cover"
name: "Megadesk"
id: cover_megadesk
### Weather
sensor:
- platform: homeassistant
id: weather_temperature
entity_id: weather.accuweather
attribute: temperature
- platform: homeassistant
id: weather_humidity
entity_id: weather.accuweather
attribute: humidity
image:
- file: mdi:weather-night
id: weather_clear
resize: 50x50
- file: mdi:weather-cloudy
id: weather_cloudy
resize: 50x50
- file: mdi:weather-fog
id: weather_fog
resize: 50x50
- file: mdi:weather-hail
id: weather_hail
resize: 50x50
- file: mdi:weather-rainy
id: weather_rainy
resize: 50x50
- file: mdi:weather-snowy
id: weather_snow
resize: 50x50
- file: mdi:weather-sunny
id: weather_sunny
resize: 50x50
- file: mdi:weather-windy
id: weather_windy
resize: 50x50
- file: mdi:weather-partly-cloudy
id: weather_partly_cloudy
resize: 50x50
- file: mdi:weather-lightning
id: weather_lightning
resize: 50x50
# Launch image is included with other images
- id: launch_image
file: $launch_image_file
resize: $launch_image_size
type: $launch_image_type
### Games
homeThingAppSnake:
id: snake
display: my_display
display_state: display_state_id
homeThingAppBreakout:
id: breakout
display: my_display
display_state: display_state_id
### IR Blaster
remote_transmitter:
pin: GPIO13
# Infrared remotes use a 50% carrier signal
carrier_duty_percent: 50%
id: infrared
homeThingAppCatToy:
id: cat_toy
remote_transmitter: infrared
display: my_display
display_state: display_state_id
text_sensor:
- platform: homeassistant
entity_id: "sensor.weather_condition"
name: "Weather state"
id: weather_state
### Weather App
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
rainy: weather_rainy
snow: weather_snow
sunny: weather_sunny
clear: weather_clear
hail: weather_hail
windy: weather_windy
partly_cloudy: weather_partly_cloudy
lightning: weather_lightning
### HomeThing
color: # setup primary accent color
- id: my_primary_accent
red_int: 75
green_int: 45
blue_int: 210
homeThingDisplayState:
id: display_state_id
colors:
accent_primary: my_primary_accent
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
homeThing:
id: homeThingMenu
apps:
- now_playing
- breakout
- snake
- cat_toy
- weather
backlight: backlight
battery:
battery_percent: battery_percent
charging: charging
boot:
api_connected: api_connected
media_players_loaded: media_players_loaded_sensor
launch_image: launch_image
display: my_display
header:
time_id: esptime
display_state: display_state_id
on_redraw:
then:
component.update: my_display
settings:
sleep_after: 3600
display_timeout_while_charging: 30
idle_app: now_playing
max_brightness: 0.5
sleep_switch: sleep_toggle
home_screen:
name: homeThing
entities:
- type: cover
name: "Desk"
id: cover_megadesk
- type: number
name: "Desk Height"
id: desk_height_number
- type: command
name: "Feed cat"
command:
- homeassistant.service:
service: button.press
data:
entity_id: "button.catfeeder_node_feed_single"
screens:
- name: Lights Screen
entities:
- id: light_all_lights
type: light
- type: command
name: "Color scene"
command:
- homeassistant.service:
service: script.colors
- 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
- id: reset_switch
type: switch
display:
- platform: tdisplays3
id: my_display
rotation: 180
update_interval: 60s
lambda: |-
id(homeThingMenu)->draw_menu_screen();
return;