-
Notifications
You must be signed in to change notification settings - Fork 9
/
sensor.yaml
53 lines (43 loc) · 1.2 KB
/
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
substitutions:
# change device name to match your desired name
device_name: sensor-name-occupancy-sensor
# change sensor name below to the one you want to see in Home Assistant
device_name_pretty: Room Name Occupancy Sensor
# change the below to be your WiFi SSID
ssid: SSID
# change the below to be your WiFi password
wifi_password: WIFIPASSWORD
# UART Pin configured for a D1 Mini stacked setup
uart_tx_pin: GPIO4
# TX Pin configured for a D1 Mini stacked setup
uart_rx_pin: GPIO5
# RX Pin configured for a D1 Mini stacked setup
gpio_pin: GPIO16
# include the yml file with the sensor configuration
packages:
inclusions: !include packages/leapmmw_sensor.yml
esphome:
name: $device_name
esp8266:
board: d1_mini
# Enable Home Assistant API
api:
password: ""
ota:
password: ""
# Connect to WiFi & create captive portal and web server
wifi:
ssid: "${ssid}"
password: "${wifi_password}"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${device_name_pretty}"
password: "${wifi_password}"
captive_portal:
web_server:
port: 80
version: 2
include_internal: true
http_request:
useragent: esphome/$device_name
timeout: 2s