62 lines
1.1 KiB
YAML
62 lines
1.1 KiB
YAML
esphome:
|
|
name: sonoff_basic1
|
|
platform: ESP8266
|
|
board: esp01_1m
|
|
platformio_options:
|
|
upload_speed: 115200
|
|
|
|
wifi:
|
|
ssid: "Meneely"
|
|
password: "punxsutawney1"
|
|
|
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
|
ap:
|
|
ssid: "sonoff_basic1 Fallback Hotspot"
|
|
password: "QNWj7LmaNoD6"
|
|
manual_ip:
|
|
# Set this to the IP of the ESP
|
|
static_ip: 192.168.87.11
|
|
# Set this to the IP address of the router. Often ends with .1
|
|
gateway: 192.168.86.1
|
|
# The subnet of the network. 255.255.255.0 works for most home networks.
|
|
subnet: 255.255.254.0
|
|
# fast_connect: True
|
|
|
|
captive_portal:
|
|
|
|
# Enable logging
|
|
logger:
|
|
level: INFO
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
|
|
ota:
|
|
|
|
# mqtt:
|
|
# broker: 192.168.86.99
|
|
# discovery: True
|
|
# username: ha
|
|
# password: lorrie
|
|
# keepalive: 2s
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
pin:
|
|
number: GPIO0
|
|
mode: INPUT_PULLUP
|
|
inverted: True
|
|
name: "Sonoff Basic 1 Button"
|
|
on_press:
|
|
- switch.toggle: relay
|
|
|
|
switch:
|
|
- platform: gpio
|
|
name: "Sonoff Basic 1 Relay"
|
|
pin: GPIO12
|
|
id: relay
|
|
|
|
status_led:
|
|
pin:
|
|
number: GPIO13
|
|
inverted: yes |