-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
m5stack-stickc.yaml
234 lines (215 loc) · 5.92 KB
/
m5stack-stickc.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
esphome:
name: m5stickc
esp32:
board: m5stick-c
framework:
type: arduino
# WiFi Configuration, uncomment and fill secrets.yaml with wifi_ssid and wifi_password to enable fast connect
captive_portal:
wifi:
# ssid: !secret wifi_ssid
# password: !secret wifi_password
# fast_connect: true
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "homeThing Fallback Hotspot"
external_components: #include homething, and esphome-components
- source: github://landonr/homeThing
# type: local
# path: components
refresh: 0s
components: [homeThingDisplayState, homeThing, homeThingApp, homeThingAppNowPlaying]
- 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:
# type: git
# url: https://gitlab.com/geiseri/esphome_extras.git
# refresh: 0s
# components: [axp192]
- source:
type: git
url: https://github.com/landonr/esphome-axp192
ref: "lando/add-charging-indicator"
components: [axp192]
refresh: 0s
packages: # maybe modify: include default ipod controls
# common
device_base: github://landonr/homeThing/common/device_base.yaml@main
# axp192: !include ../homeThing/common/m5stack-stickc/axp192-marty.yaml # power management and screen backlight
remote_package:
url: https://github.com/landonr/homeThing
ref: main
files: [
common/fonts.yaml, # default font
common/icon_fonts.yaml, # material icons
common/settings.yaml, # settings screen
common/m5stack-stickc/axp192-marty.yaml, # power management and screen backlight
common/m5stack-stickc/binary_sensor.yaml, # power management and screen backlight
common/images.yaml, # boot screen image
]
refresh: 0s
substitutions:
friendly_name: "homeThingM5StickC"
color: # setup primary accent color
- id: my_primary_accent
red_int: 75
green_int: 45
blue_int: 209
light: # home assistant lights
- 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
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
media_players:
- id: media_player_beam
type: speaker
- id: media_player_tv
type: roku
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
homeThingAppNowPlaying:
id: now_playing
media_player_group: media_group_component
display: my_display
display_state: display_state_id
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
settings:
sleep_after: 14400
display_timeout_while_charging: 30
display: my_display
backlight: backlight
battery:
battery_percent: batteryPercent
charging: axp_charger
on_redraw:
then:
component.update: my_display
display_state: display_state_id
apps:
- now_playing
screens:
- name: Desk Screen
entities:
- type: cover
id: cover_megadesk
- type: number
id: desk_height_number
- type: command
name: "desk nudge up"
command:
- homeassistant.service:
service: button.press
data:
entity_id: "button.desk_position_nudge_up"
- 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
- type: command
name: "color lights"
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: "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: GPIO13
mosi_pin: GPIO15
display:
- platform: st7735
model: "INITR_18BLACKTAB"
id: my_display
reset_pin: GPIO18
cs_pin: GPIO5
dc_pin: GPIO23
rotation: 90
device_width: 128
device_height: 160
col_start: 0
row_start: 0
eight_bit_color: true
update_interval: 3600s
lambda: |-
id(homeThingMenu)->draw_menu_screen();
return;