/
esphome-sensor.yaml
73 lines (61 loc) · 1.33 KB
/
esphome-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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
esphome:
name: ${devicename}
platform: ESP8266
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${roomname}-sensor Fallback Hotspot"
password: !secret ap_password
captive_portal:
i2c:
sda: D2
scl: D1
scan: True
id: bus_a
output:
- platform: esp8266_pwm
id: onboard_led
pin:
number: D4
inverted: true
light:
- platform: monochromatic
name: "${roomname} Temp Onboard LED"
output: onboard_led
id: led
sensor:
- platform: dht
pin: RX
temperature:
name: "${roomname} Temperature"
filters:
- lambda: return x * (9.0/5.0) + 32.0;
unit_of_measurement: "°F"
humidity:
name: "${roomname} Humidty"
update_interval: 60s
- platform: wifi_signal
name: "${roomname} ESP WiFi Signal Sensor"
update_interval: 300s
- platform: bh1750
name: "${roomname} light level"
#address: 0x23
measurement_duration: 69
update_interval: 10s
binary_sensor:
- platform: gpio
pin: GPIO16
name: "${roomname} Motion Sensor"
device_class: motion
substitutions:
roomname: room
devicename: device