-
Notifications
You must be signed in to change notification settings - Fork 39
/
example.yaml
146 lines (127 loc) · 2.64 KB
/
example.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
esp32:
board: esp32dev
framework:
type: arduino
esphome:
name: tablet
on_boot:
priority: 750.0
then:
- IT8951E.clear
- delay: 100ms
- component.update: m5paper_display
# Enable logging
logger:
# Enable psram
psram:
# Enable Home Assistant API
api:
password: ""
ota:
safe_mode: false
password: ""
font:
- file: 'fonts/ComicSansMS3.ttf'
id: font1
size: 20
- file: 'fonts/ComicSansMS3.ttf'
id: large_font
size: 40
spi:
clk_pin: GPIO14
mosi_pin: GPIO12
miso_pin: GPIO13
i2c:
sda: GPIO21
scl: GPIO22
display:
- platform: it8951e
id: m5paper_display
display_cs_pin: GPIO15
reset_pin: GPIO23
busy_pin: GPIO27
rotation: 90
reversed: False
update_interval: "never"
lambda: |-
it.printf(25, 25, id(large_font), "%.1f°", id(current_temperature).state);
it.strftime(350, 25, id(large_font), "%H:%M:%S", id(rtc_time).now());
touchscreen:
- platform: gt911
display: m5paper_display
id: gt911_touchscreen
interrupt_pin: GPIO36
# Deep sleep works, but it's not great battery life, i'd advise using the
# bm
#deep_sleep:
# id: deep_sleep_1
# run_duration: 30s
# sleep_duration: 20min
# wakeup_pin:
# number: GPIO38
# inverted: true
# esp32_ext1_wakeup:
# pins:
# - GPIO37
# mode: ALL_LOW
wifi:
ssid: YOUR SSID
password: YOUR PASSWORD
power_save_mode: "HIGH"
time:
- platform: homeassistant
id: ha_time
on_time_sync:
- bm8563.write_time
- platform: bm8563
id: rtc_time
sleep_duration: 3600000ms
m5paper:
battery_power_pin: GPIO5
main_power_pin: GPIO2
update_interval: 10s
battery_voltage:
name: "M5Paper Battery"
sensor:
- platform: sht3xd
temperature:
name: "M5Paper Temperature"
humidity:
name: "M5Paper Humidity"
address: 0x44
update_interval: 10s
binary_sensor:
- platform: gpio
name: "Right"
id: right_button
pin:
number: GPIO37
inverted: true
on_press:
- component.update: m5paper_display
on_release:
- component.update: m5paper_display
- platform: gpio
name: "BTN/PWR"
pin:
number: GPIO38
inverted: true
- platform: gpio
name: "Left"
pin:
number: GPIO39
inverted: true
- platform: touchscreen
name: Top Left Touch Button
id: top_left_touch_button
touchscreen_id: gt911_touchscreen
internal: true
x_min: 0
x_max: 100
y_min: 0
y_max: 100
on_press:
# Example of applying the sleep duration and shutting down to the lowest power mode
- bm8563.apply_sleep_duration
- delay: 1s
- m5paper.shutdown_main_power