-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
air-gradient-pro-presoldered.yaml
116 lines (97 loc) · 2.52 KB
/
air-gradient-pro-presoldered.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
# Airgradient Pro presoldered edition
# D1 mini v4.0.0 with usb c port
substitutions:
devicename: "airgradient-pro"
upper_devicename: "Airgradient Pro"
esphome:
name: "${devicename}"
# Automatically add the mac address to the name
# so you can use a single firmware for all devices
# name_add_mac_suffix: true
platform: ESP8266
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: !secret ota_password
# dashboard_import:
# package_import_url: github://esphome/esphome-project-template/project-template-esp32.yaml@v6
# package_import_url: github://ajfriesen/ESPHome-AirGradient/main/air-gradient.yaml
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
reboot_timeout: 15min
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${upper_devicename} Fallback Hotspot
password: "IpB22HU395jj"
switch:
- platform: safe_mode
name: "Flash Mode (Safe Mode)"
captive_portal:
i2c:
sda: D2
scl: D1
font:
- file: "font/monofont.ttf"
id: opensans
size: 12
display:
- platform: ssd1306_i2c
id: oled
address: 0x3c
rotation: 180°
model: "SH1106 128x64"
pages:
- id: page1
lambda: |-
it.printf(0, 0, id(opensans), "CO2: %.0fppm", id(co2).state);
it.printf(0, 15, id(opensans), "PM25: %.0f", id(pm25).state);
it.printf(0, 25, id(opensans), "Humidity: %.0f", id(humidity).state);
it.printf(0, 35, id(opensans), "Temperature: %.0fC", id(temp).state);
# Maybe add a page later
interval:
- interval: 5s
then:
- display.page.show_next: oled
- component.update: oled
uart:
- rx_pin: D5
tx_pin: D6
baud_rate: 9600
id: uart_1
- rx_pin: D4
tx_pin: D3
baud_rate: 9600
id: uart_2
sensor:
- platform: sht3xd
temperature:
id: temp
name: ${upper_devicename} Temperature
humidity:
id: humidity
name: ${upper_devicename} Humidity
address: 0x44
update_interval: 10s
- platform: pmsx003
type: PMSX003
uart_id: uart_1
pm_2_5:
id: pm25
name: "${upper_devicename} Particulate Matter <2.5µm Concentration"
# pm_10_0:
# id: pm100
# name: "Particulate Matter <10.0µm Concentration"
# formaldehyde:
# id: hcho
# name: "Formaldehyde (HCHO) concentration in µg per cubic meter"
- platform: senseair
uart_id: uart_2
co2:
id: co2
name: "${upper_devicename} SenseAir CO2 Value"
update_interval: 60s