-
Notifications
You must be signed in to change notification settings - Fork 0
/
esp32-m5stack-lcd.yaml
79 lines (67 loc) · 1.29 KB
/
esp32-m5stack-lcd.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
substitutions:
devicename: "esphome-display"
esphome:
name: esp32-m5stack-lcd
includes:
- widget.h
platformio_options:
board_build.flash_mode: dio
board_build.f_cpu: 240000000L
board_build.f_flash: 40000000L
#board_build.flash_size: 4MB
#board_upload.flash_size: 4MB
esp32:
board: m5stack-grey
framework:
type: esp-idf
flash_size: 4MB
psram:
speed: 40Mhz
<<: !include common.yaml
light:
spi:
clk_pin: 18
mosi_pin: 23
# miso_pin: 25
i2c:
sda: 21
scl: 22
scan: true
<<: !include display.yaml
<<: !include sensors.yaml
packages:
pv-sensors: !include
file: pv-sensors.yaml
switch:
- platform: gpio
pin: 32
name: "Display Backlight"
id: backlight
inverted: false
restore_mode: ALWAYS_ON
binary_sensor:
- platform: status
name: "Node Status"
id: system_status
- platform: gpio
pin: 39
internal: true
id: button_a
on_press:
- display.page.show_previous: tft_ha
- component.update: tft_ha
- platform: gpio
pin: 38
name: "Button B"
id: button_b
internal: true
on_press:
- switch.toggle: backlight
- platform: gpio
pin: 37
name: "Button C"
id: button_c
internal: true
on_press:
- display.page.show_next: tft_ha
- component.update: tft_ha