-
Notifications
You must be signed in to change notification settings - Fork 0
/
particulate.yaml
81 lines (69 loc) · 1.57 KB
/
particulate.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
esphome:
name: particulate
platform: ESP8266
board: d1_mini
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: LIGHT
use_address: 10.0.0.11
ap:
password: !secret fallback_password
captive_portal:
logger:
api:
ota:
mqtt:
broker: !secret mqtt_broker
username: !secret mqtt_username
password: !secret mqtt_password
discovery: false # Publish to MQTT, but not for Home Assistant (HA uses its own API)
web_server:
prometheus:
# For SDS011 particulate, 5V
uart:
rx_pin: D3
tx_pin: D4
baud_rate: 9600
# For BH1750 lux sensor, 5V
i2c:
sda: D2
scl: D1
scan: False
sensor:
- platform: sds011
pm_2_5:
name: "Particulate Matter <2.5µm Concentration"
pm_10_0:
name: "Particulate Matter <10.0µm Concentration"
update_interval: 2min
- platform: dht # 3V3
pin: D7
model: AM2302
temperature:
name: "Particulate Temperature"
humidity:
name: "Particulate Humidity"
update_interval: 60s
- platform: bh1750
name: "Outdoor Illuminance"
id: illuminance
update_interval: 30s
accuracy_decimals: 0
- platform: template
name: "Outdoor Illuminance Average"
device_class: "illuminance"
unit_of_measurement: "lx"
icon: "mdi:brightness-auto"
update_interval: 30s
accuracy_decimals: 0
lambda: |-
return id(illuminance).state;
filters:
- sliding_window_moving_average:
window_size: 20 # 10 min moving average
send_every: 2
send_first_at: 2
switch:
- platform: restart
name: "Particulate Restart"