esphome-docs/devices/sonoff_s20.yaml

48 lines
638 B
YAML

esphome:
name: <NAME_OF_NODE>
esp8266:
board: esp8285
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
api:
logger:
ota:
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode:
input: true
pullup: true
inverted: true
name: "Sonoff S20 Button"
on_press:
- switch.toggle: relay
- platform: status
name: "Sonoff S20 Status"
switch:
- platform: gpio
name: "Sonoff S20 Relay"
pin: GPIO12
id: relay
output:
- platform: esp8266_pwm
id: s20_green_led
pin: GPIO13
inverted: true
light:
- platform: monochromatic
name: "Sonoff S20 Green LED"
output: s20_green_led