-
Notifications
You must be signed in to change notification settings - Fork 0
/
iaq-node.yaml
97 lines (87 loc) · 2.2 KB
/
iaq-node.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
---
packages:
site: !include site.yaml
board: !include board_ttgo_t-display.yaml
product: !include product_iaq_monitor.yaml
esphome:
name: ${esphome_name}
comment: ${esphome_comment}
build_path: ./build/${esphome_name}
includes: # Only included into main sketch
- display.h
time:
- platform: homeassistant
id: time_esp
# TODO(xo): Move display and buttons blocks into board config, keeping only
# application logic (page rendering and navigation)
display:
- platform: ili9xxx
model: st7789v
cs_pin: 5
dc_pin: 16
reset_pin: 23
id: display_front
invert_colors: true
dimensions:
width: 135
height: 240
offset_width: 52
offset_height: 40
rotation: 180
pages:
- lambda: DrawPage(it, 0);
- lambda: DrawPage(it, 1);
- lambda: DrawPage(it, 2);
binary_sensor:
- platform: gpio
id: gpio_s1
name: "${friendly_shortname} Button S1"
internal: true
pin:
number: 0
inverted: true
on_click:
- min_length: 50ms
max_length: 350ms
then:
- display.page.show_next: display_front
- component.update: display_front
- min_length: 1s
max_length: 10s
then:
- scd30.force_recalibration_with_reference:
value: 420 # NOAA average for 2023/02
- platform: gpio
id: gpio_s2
name: "${friendly_shortname} Button S2"
internal: true
pin:
number: 35
inverted: true
on_click:
then:
- display.page.show_previous: display_front
- component.update: display_front
font:
- file: "CallunaSansRegular.ttf"
id: font_sans_48
size: 48
glyphs: &font_glyphs
# Include both μ (U+03BC Greek Small Letter Mu) and µ (U+00B5 Micro Sign)
' !"%()+,-./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ:abcdefghijklmnopqrstuvwxyz_μµ°²³₂'
- file: "CallunaSansRegular.ttf"
id: font_sans_34
size: 34
glyphs: *font_glyphs
- file: "CallunaSansRegular.ttf"
id: font_sans_24
size: 24
glyphs: *font_glyphs
- file: "CallunaSansRegular.ttf"
id: font_sans_17
size: 17
glyphs: *font_glyphs
- file: "CallunaSansRegular.ttf"
id: font_sans_12
size: 12
glyphs: *font_glyphs