-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrewery.yaml
90 lines (77 loc) · 1.59 KB
/
brewery.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
esphome:
name: brewery
platform: ESP32
board: nodemcu-32s
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
web_server:
port: 80
uart:
tx_pin: GPIO22
rx_pin: GPIO23
baud_rate: 9600
i2c:
sda: GPIO18
scl: GPIO19
scan: true
sensor:
- platform: mhz19
id: brewery_mhz19
co2:
id: brewery_co2
name: "Brewery CO2"
temperature:
name: "Brewery Temperatūra"
update_interval: 60s
automatic_baseline_calibration: false
switch:
- platform: restart
name: "Brewery Restart"
- platform: template
name: "Brewery CO2 Baseline Calibration"
assumed_state: true
turn_on_action:
- mhz19.calibrate_zero: brewery_mhz19
font:
- id: s
file: "fonts/BebasNeue-Regular.ttf"
size: 19
- id: m
file: "fonts/BebasNeue-Regular.ttf"
size: 28
- id: l
file: "fonts/BebasNeue-Regular.ttf"
size: 58
graph:
- id: co2_graph
sensor: brewery_co2
duration: 1h
x_grid: 10min
y_grid: 1000
width: 128
height: 64
display:
- id: brewery_display
platform: ssd1306_i2c
model: "SSD1306 128x64"
address: 0x3c
flip_y: false
flip_x: false
pages:
- id: page1
lambda: |-
it.print(0, 6, id(m), "CO2");
it.print(4, 36, id(s), "ppm");
it.printf(it.get_width(), 0, id(l), TextAlign::TOP_RIGHT, "%.0f", id(brewery_co2).state);
- id: page2
lambda: |-
it.graph(0, 0, id(co2_graph));
interval:
- interval: 10s
then:
- display.page.show_next: brewery_display
- component.update: brewery_display
logger:
api:
ota: