-
Notifications
You must be signed in to change notification settings - Fork 0
/
proto-tdisplay.yaml
159 lines (148 loc) · 4.48 KB
/
proto-tdisplay.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
esphome:
name: proto_tdisplay
platform: ESP32
board: featheresp32
on_boot:
priority: 600.0
then:
- delay: 45s
- if:
condition:
not:
- wifi.connected:
then:
- switch.turn_on: sleep_toggle
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/landonr/homeThing
ref: main
# type: local
# path: ../homething/components
components: [homeThing, homeThingDisplayState, homeThingApp, homeThingAppNowPlaying, homeThingAppSnake]
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: github://pr#5214 # used to load images on compile
# components: [ image ]
# refresh: 0s
- source: github://pr#5254 # used to load fonts on compile
components: [ font ]
refresh: 0s
packages:
# device_base: !include ../homeThing/common/device_base.yaml
# ipod_control_backlight: !include ../homeThing/common/ipod/lilygo_tdisplay_ipod_backlight.yaml
# ipod_control_battery: !include ../homeThing/common/ipod/lilygo_tdisplay_ipod_battery.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_sleep: !include ../homeThing/common/ipod/lilygo_tdisplay_ipod_sleep.yaml
# fonts: !include ../homeThing/common/fonts.yaml
# icon_fonts: !include ../homeThing/common/icon_fonts.yaml
home_media_player: !include homeConfig/media_player_light.yaml
home_light: !include homeConfig/light.yaml
home_switch: !include homeConfig/switch.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/ipod/lilygo_tdisplay_ipod_backlight.yaml, # used for toggling backlight
# 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/fonts.yaml, # default font
common/icon_fonts.yaml, # material icons
common/images.yaml # boot screen image
# common/settings.yaml, # settings screen
]
refresh: 0s
substitutions:
friendly_name: "homeThing proto"
rotary_pin_a: "12"
rotary_pin_b: "13"
rotary_select_pin: "15"
rotary_down_pin: "2"
rotary_right_pin: "17"
rotary_up_pin: "22"
rotary_left_pin: "21"
spi:
clk_pin: GPIO18
mosi_pin: GPIO19
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
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_font
font_material_large: material_font_large
font_material_small: material_font_small
homeThing:
id: homeThingMenu
settings:
sleep_after: 14400
display_timeout: 8
display_timeout_while_charging: 8
# sleep_switch: sleep_toggle
backlight: backlight
# battery:
# battery_percent: battery_percent
# charging: charging
display: my_display
display_state: display_state_id
on_redraw:
then:
component.update: my_display
apps:
- now_playing
- snake
header:
time_id: esptime
boot:
api_connected: api_connected
media_players_loaded: media_players_loaded_sensor
launch_image: launch_image
display:
- platform: st7789v
model: TTGO_TDisplay_135x240
id: my_display
cs_pin: GPIO5
dc_pin: GPIO16
reset_pin: GPIO23
backlight_pin: no
rotation: 90
update_interval: 10s
lambda: |-
id(homeThingMenu)->draw_menu_screen();
return;