-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshabadge.yaml
192 lines (173 loc) · 3.81 KB
/
shabadge.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
esphome:
name: shabadge-${name}
esp32:
board: esp32thing
framework:
type: arduino
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ota:
platform: esphome
password: !secret ota_password
logger:
mqtt:
broker: !secret mqtt_server
spi:
clk_pin: 18
mosi_pin: 5
i2c:
sda: 26
scl: 27
scan: true
uart:
id: uart_mhz19
rx_pin: 17
tx_pin: 16
baud_rate: 9600
mpr121:
id: mpr121_component
address: 0x5A
touch_debounce: 1
release_debounce: 1
touch_threshold: 10
release_threshold: 7
binary_sensor:
- platform: mpr121
id: touch_A
channel: 0
name: "Touch A"
disabled_by_default: true
- platform: mpr121
id: touch_B
channel: 1
name: "Touch B"
disabled_by_default: true
- platform: mpr121
id: touch_START
channel: 2
name: "Touch Start"
disabled_by_default: true
- platform: mpr121
id: touch_SEL
channel: 3
name: "Touch Select"
disabled_by_default: true
- platform: mpr121
id: touch_DOWN
channel: 4
name: "Touch Down"
disabled_by_default: true
- platform: mpr121
id: touch_RIGHT
channel: 5
name: "Touch Right"
disabled_by_default: true
- platform: mpr121
id: touch_UP
channel: 6
name: "Touch Up"
disabled_by_default: true
- platform: mpr121
id: touch_LEFT
channel: 7
name: "Touch Left"
disabled_by_default: true
- platform: gpio
name: "Flash Button"
disabled_by_default: true
pin: 0
filters:
- invert:
output:
- id: led_and_mhz19_power
platform: gpio
pin:
mpr121: mpr121_component
number: 10
mode: OUTPUT
inverted: true
text_sensor:
- platform: version
name: "ESPHome Version"
hide_timestamp: true
state_topic: bitlair/esphome/shabadge-${name}/version
sensor:
- platform: wifi_signal
name: "WiFi Signal dB"
update_interval: 10s
state_topic: bitlair/esphome/shabadge-${name}/wifi_signal
retain: false
- platform: mhz19
uart_id: uart_mhz19
co2:
name: "MH-Z19 CO2 Value"
id: co2
state_topic: bitlair/climate/${name}/co2_ppm
retain: false
update_interval: 10s
automatic_baseline_calibration: false
- platform: bme280_i2c
temperature:
name: "BME280 Temperature"
id: temperature
oversampling: 16x
state_topic: bitlair/climate/${name}/temperature_c
retain: false
pressure:
name: "BME280 Pressure"
id: pressure
state_topic: bitlair/climate/${name}/pressure_hpa
retain: false
humidity:
name: "BME280 Humidity"
id: humidity
state_topic: bitlair/climate/${name}/humidity_pct
retain: false
address: 0x76
update_interval: 10s
graph:
- id: co2_graph
duration: 6h
width: 290
height: 63
x_grid: 30min
y_grid: 100 # ppm
min_value: 0 # Start of Y-axis range
max_range: 2000 # Specifies the max Y-axis range.
traces:
- sensor: co2
line_type: SOLID
line_thickness: 2
font:
- file: "gfonts://Roboto"
id: font_big
size: 32
- file: "gfonts://Roboto"
id: font_small
size: 18
display:
- platform: waveshare_epaper
model: 2.90in-dke
cs_pin: 19
dc_pin: 21
busy_pin: 22
reset_pin: 23
update_interval: 20s
lambda: |-
it.printf(0, 34, id(font_small), "${name}");
it.printf(0, 0, id(font_big), "%.0f ppm", id(co2).state);
it.graph(4, 64, id(co2_graph));
it.printf(160, 10, id(font_small), "%.1f °C", id(temperature).state);
it.printf(160, 34, id(font_small), "%.0f %%", id(humidity).state);
it.printf(220, 34, id(font_small), "%.0f hPa", id(pressure).state);
rotation: 270
light:
- platform: esp32_rmt_led_strip
rgb_order: GRB
is_rgbw: true
pin: 32
num_leds: 6
rmt_channel: 0
chipset: sk6812
id: ledstrip