-
Notifications
You must be signed in to change notification settings - Fork 0
/
hackem-co2-downstairs.yaml
73 lines (60 loc) · 1.28 KB
/
hackem-co2-downstairs.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
esphome:
name: downstairs-co2
friendly_name: downstairs-co2
on_boot:
then:
- wait_until:
condition:
wifi.connected:
- lambda: >
id(ble_tracker).set_scan_continuous(true);
id(ble_tracker).start_scan();
esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
# Enable logging
logger:
esp32_ble_tracker:
id: ble_tracker
scan_parameters:
continuous: false
interval: 1100ms
window: 800ms
active: false
bluetooth_proxy:
active: true
uart:
rx_pin: GPIO4
tx_pin: GPIO5
baud_rate: 9600
sensor:
- platform: mhz19
id: meow
co2:
name: "Downstairs CO2 Value"
temperature:
name: "MH-Z19 Temperature"
update_interval: 30s
automatic_baseline_calibration: false
button:
- platform: restart
name: "Restart"
# Enable Home Assistant API
api:
encryption:
key: !secret doorlock_apikey
services:
- service: mhz19_calibrate_zero
then:
- mhz19.calibrate_zero: meow
ota:
password: !secret ota_pass
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Downstairs-Co2 Fallback Hotspot"
password: !secret wifi_fallback_password
captive_portal: