-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm5stickcplus.yaml
executable file
·279 lines (258 loc) · 7.18 KB
/
m5stickcplus.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
esphome:
name: m5stickcplus
esp32:
board: m5stick-c
framework:
type: arduino
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/esphome/esphome
# ref: dev
# components: [adc, i2s_audio, microphone]
- source:
type: git
url: https://github.com/landonr/esphome-axp192
ref: lando/add-charging-indicator
# type: local
# path: ../axp192/components
refresh: 0s
components: [axp192]
- source:
type: git
url: https://github.com/landonr/homeThing
ref: main
# type: local
# path: ../homeThing/components
refresh: 0s
components: [homeThing, homeThingDisplayState, homeThingApp, homeThingAppNowPlaying, homeThingAppBreakout ]
- source:
type: git
url: https://github.com/landonr/esphome-components
ref: main
# type: local
# path: ../local_components/components
refresh: 0s
components: [
homeassistant_component,
homeassistant_media_player,
media_player_source,
media_player_source_sonos,
media_player_source_spotify,
media_player_source_custom,
MiniEncoderC,
]
# - source: github://pr#5214 # used to load images on compile
# components: [ image ]
- source: github://pr#5254 # used to load fonts on compile
components: [ font ]
refresh: 0s
packages:
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-stickc/axp192-marty.yaml, # power management and screen backlight
common/m5stack-stickc/binary_sensor.yaml, # buttons
common/m5stack-stickc/MiniEncoderC.yaml, # rotary encoder and built in led
common/images.yaml # boot screen image
]
refresh: 0s
# home_media_player: !include homeConfig/media_player_light.yaml
home_light: !include homeConfig/light.yaml
home_switch: !include homeConfig/switch.yaml
# device_base: !include ../homeThing/common/device_base.yaml
# fonts: !include ../homeThing/common/fonts.yaml
# icon_fonts: !include ../homeThing/common/icon_fonts.yaml
# axp192-marty: !include ../homeThing/common/m5stack-stickc/axp192-marty.yaml # power management and screen backlight
# binary_sensor: !include ../homeThing/common/m5stack-stickc/binary_sensor.yaml # buttons
# binary_sensor_voice: !include ../homeThing/common/m5stack-stickc/binary_sensor_voice.yaml # buttons
# mini_encoder_c: !include ../homeThing/common/m5stack-stickc/MiniEncoderCVoice.yaml # rotary encoder and built in led
# mini_encoder_c: !include ../homeThing/common/m5stack-stickc/MiniEncoderC.yaml # rotary encoder and built in led
substitutions:
friendly_name: "homeThingM5StickPlus"
log_level: INFO
large_heavy_font_size: "20"
large_font_size: "20"
medium_font_size: "14"
small_font_size: "12"
home_thing_logo_size: "48"
material_font_large_size: "16"
material_font_small_size: "14"
spi:
clk_pin: GPIO13
mosi_pin: GPIO15
light:
- platform: homeassistant_component
id: light_rgb_lights
entity_id: light.rgb_lights
name: Color Lights
- platform: esp32_rmt_led_strip
chipset: WS2812
rgb_order: GRB
pin: GPIO32
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
- 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
color:
- id: my_primary_accent
red_int: 230
green_int: 30
blue_int: 2
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
draw_battery_level: True
colors:
accent_primary: my_primary_accent
# media_player_source_sonos:
# id: sonos
# media_player_source_spotify:
# id: spotty
# media_player_source_custom:
# - id: fav_playlists
# name: playlists
# sources:
# name: liked songs
# media_id: spotify:user:t5vciyb6zy94uerxdhb0mopfn:collection
# media_type: playlist
# - id: youtube_videos
# name: youtube videos
# sources:
# - name: fred again boilerroom
# media_id: c0-hvjV2A5Y
# media_type: app
# app: youtube
# - name: 100 gecs boilerroom
# media_id: 8NWHnWbpxmc
# media_type: app
# app: youtube
# - name: young marco dekmantel 2017
# media_id: 1_vXiL_qD5c
# media_type: app
# app: youtube
# - name: fred again, skrilly, four tet coachella
# media_id: dFfC92iBxNw
# media_type: app
# app: youtube
media_player:
- platform: homeassistant_media_player
name: Beam
entity_id: "media_player.beam"
id: media_player_beam
type: speaker
# sources:
# - id: sonos
# type: sonos
# - id: spotty
# type: spotify
# - id: fav_playlists
# type: custom
commands:
name: "group all"
command:
- homeassistant.service:
service: script.sonos_group_all
homeassistant_media_player:
id: media_group_component
media_players:
- id: media_player_beam
type: speaker
homeThingAppNowPlaying:
id: now_playing
media_player_group: media_group_component
display: my_display
display_state: display_state_id
draw_bottom_menu: True
remote_transmitter:
pin: GPIO9
carrier_duty_percent: 50%
id: infrared
homeThingAppBreakout:
id: breakout
display: my_display
display_state: display_state_id
switch:
- platform: restart
id: restart_switch
name: "${friendly_name} Restart"
homeThing:
id: homeThingMenu
settings:
display_timeout: 10
display_timeout_while_charging: 10
apps:
- now_playing
- breakout
backlight: backlight
display_state: display_state_id
battery:
battery_percent: batteryPercent
charging: axp_charger
display: my_display
boot:
api_connected: api_connected
launch_image: launch_image
on_redraw:
then:
component.update: my_display
home_screen:
name: root
entities:
- id: light_rgb_lights
type: light
- type: command
name: "Morning Scene"
command:
- homeassistant.service:
service: script.warm
display:
- platform: st7789v
model: TTGO_TDisplay_135x240
id: my_display
cs_pin: GPIO5
dc_pin: GPIO23
reset_pin: GPIO18
backlight_pin: no
rotation: 180
update_interval: 3600s
lambda: |-
id(homeThingMenu)->draw_menu_screen();
return;