-
Notifications
You must be signed in to change notification settings - Fork 0
/
motion_common.yaml
67 lines (57 loc) · 1.53 KB
/
motion_common.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
esphome:
name: ${device_name}
comment: ${device_description}
platform: ESP8266
board: nodemcuv2
wifi:
ssid: mywifissid
password: myverysecureandnotatallsharedpassword
fast_connect: on #we only have one WiFi AP so just use the first one that matches
ap: #since we listed an SSID above, this AP mode will only enable if no WiFi connection could be made
ssid: ${friendly_name}_AP
password: esp_8266
captive_portal:
# Enable logging
logger:
baud_rate: 0 #disable UART logging since we aren't connected to GPIO1 TX
# Enable Home Assistant API
api:
# Enable OTA updates
ota:
# Enable web server
web_server:
port: 80
binary_sensor:
# Reports if this device is Connected or not
- platform: status
name: ${friendly_name} Status
- device_class: motion
platform: gpio
pin: D1
name: ${friendly_name} PIR Motion Sensor
id: pir_sensor
- device_class: motion
platform: gpio
pin: D2
name: ${friendly_name} MW Motion Sensor
id: mw_sensor
- platform: template
device_class: motion
name: ${friendly_name} Motion Sensor
lambda: !lambda |-
return id(mw_sensor).state && id(pir_sensor).state;
sensor:
# Reports the WiFi signal strength
- platform: wifi_signal
name: ${friendly_name} Signal
update_interval: 60s
# Reports how long the device has been powered (in minutes)
- platform: uptime
name: ${friendly_name} Uptime
filters:
- lambda: return x / 60.0;
unit_of_measurement: minutes
text_sensor:
# Reports the ESPHome Version with compile date
- platform: version
name: ${friendly_name} ESPHome Version