2019-02-16 23:25:23 +01:00
|
|
|
esphome:
|
2018-10-07 10:04:42 +02:00
|
|
|
name: <NAME_OF_NODE>
|
2022-02-10 23:10:43 +01:00
|
|
|
|
|
|
|
esp8266:
|
2020-03-12 22:19:28 +01:00
|
|
|
board: esp8285
|
2018-10-07 10:04:42 +02:00
|
|
|
|
|
|
|
wifi:
|
2022-02-10 23:10:43 +01:00
|
|
|
ssid: !secret wifi_ssid
|
|
|
|
password: !secret wifi_password
|
2018-10-07 10:04:42 +02:00
|
|
|
|
2019-02-17 12:28:17 +01:00
|
|
|
api:
|
2018-10-07 10:04:42 +02:00
|
|
|
|
|
|
|
logger:
|
|
|
|
|
|
|
|
ota:
|
|
|
|
|
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: GPIO0
|
2021-11-03 19:55:26 +01:00
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2018-10-07 10:04:42 +02:00
|
|
|
name: "Sonoff S20 Button"
|
|
|
|
on_press:
|
2018-11-10 14:33:24 +01:00
|
|
|
- switch.toggle: relay
|
2018-10-07 10:04:42 +02:00
|
|
|
- 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
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2018-10-07 10:04:42 +02:00
|
|
|
|
|
|
|
light:
|
|
|
|
- platform: monochromatic
|
|
|
|
name: "Sonoff S20 Green LED"
|
|
|
|
output: s20_green_led
|