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