42 lines
628 B
YAML
42 lines
628 B
YAML
esphome:
|
|
name: sonoffstecker1
|
|
platform: ESP8266
|
|
board: sonoff_basic
|
|
|
|
# Enable logging
|
|
logger:
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
password: !secret ss1password
|
|
encryption:
|
|
key: !secret ss1password
|
|
|
|
|
|
|
|
ota:
|
|
password: !secret ss1password
|
|
|
|
wifi:
|
|
ssid: !secret wifi_ssid
|
|
password: !secret wifi_password
|
|
fast_connect: true
|
|
|
|
switch:
|
|
- platform: gpio
|
|
name: "Sonoff Stecker 1"
|
|
pin: GPIO12
|
|
id: relay
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
pin:
|
|
number: GPIO0
|
|
mode:
|
|
input: true
|
|
pullup: true
|
|
inverted: true
|
|
id: "sonoff_power"
|
|
on_press:
|
|
- switch.toggle: relay
|