forked from nuttytree/ESPHome-Devices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaster-bath-hum-temp-sensor.yaml
59 lines (53 loc) · 1.34 KB
/
master-bath-hum-temp-sensor.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
substitutions:
device_id: master-bath-hum-temp-sensor
device_name: Master Bathroom Humidity and Temperature Sensor
board: d1_mini
ip_address: !secret master-bath-hum-temp-sensor-ip
ota_pwd: !secret master-bath-hum-temp-sensor-ota-pwd
api_pwd: !secret master-bath-hum-temp-sensor-api-pwd
ap_wifi_pwd: !secret master-bath-hum-temp-sensor-ap-pwd
packages:
device_base: !include ./packages/device_base_esp8266.yaml
binary_sensor:
- platform: template
id: trigger_humidity
lambda: return (id(humidity).state - id(median_humidity).state) > 5;
filters:
- delayed_off: 5min
i2c:
sda: D2
scl: D1
scan: true
output:
- platform: gpio
pin: D3
id: bme_gnd
sensor:
- platform: bme280
temperature:
id: temperature
name: "Master Bathroom Temperature"
pressure:
id: pressure
name: "Master Bathroom Pressure"
humidity:
id: humidity
name: "Master Bathroom Humidity"
address: 0x76
update_interval: 15s
- platform: template
name: "Master Bathroom Median Humidity"
id: median_humidity
unit_of_measurement: '%'
icon: mdi:water-percent
lambda: return id(humidity).state;
update_interval: 60s
filters:
- median:
window_size: 360
send_every: 2
send_first_at: 2
status_led:
pin:
number: D4
inverted: true