Hier ein Beispiel ESPHome-Programm für Sonoff S20 Steckdosen.
Alle Standardfunktionen sind weiterhin gegeben.
configuration.yaml
1esphome:
2 name: GERÄTENAME
3 platform: ESP8266
4 board: esp01_1m
5
6wifi:
7 networks:
8 - ssid: "WLAN SSID"
9 password: "WLAN PW"
10
11
12 ap:
13 ssid: "AP KENNUNG"
14 password: "AP PW"
15
16captive_portal:
17
18api:
19
20logger:
21
22ota:
23
24binary_sensor:
25 - platform: gpio
26 pin:
27 number: GPIO0
28 mode: INPUT_PULLUP
29 inverted: True
30 name: "GERÄTENAME"
31 on_press:
32 - switch.toggle: relay
33 - platform: status
34 name: "GERÄTENAME"
35
36sensor:
37 - platform: wifi_signal
38 name: "GERÄTENAME"
39 update_interval: 60s
40
41switch:
42 - platform: gpio
43 name: "GERÄTENAME"
44 pin: GPIO12
45 id: relay
