Sonoff 4-CH mit ESPHome

SONOFF S26R2 2PCS WLAN Smarte Steckdose,16A 4000W Alexa Smart Plug,Smart Home Wifi Steckdose mit App Fernsteuerung, Sprachsteuerung und Zeitschaltuhr Funktioniert mit Echo,Echo Dot,Google Home,Ifttt.
SONOFF S26R2 2PCS WLAN Smarte Steckdose,16A 4000W Alexa Smart Plug,Smart Home Wifi Steckdose mit App Fernsteuerung, Sprachsteuerung und Zeitschaltuhr Funktioniert mit Echo,Echo Dot,Google Home,Ifttt.
--

Hier findet Ihr ein Beispiel für einen ESPHome Code passend für einen Sonoff 4-Kanal Schalter.

Danke @derrodi für das bereitstellen des Codes!

Hier findet Ihr den Sonoff 4-CH

Sonoff 4CH PRO R2 Smart Switch Home WiFi Funkfernbedienung Schalter 4 Kanal Smart Socket arbeitet mit Amazon Alexa + Elastisches Fingergriff Mobiltelefon(Geschenk)Sonoff 4CH PRO R2 Smart Switch Home WiFi Funkfernbedienung Schalter 4 Kanal Smart Socket arbeitet mit Amazon Alexa + Elastisches Fingergriff Mobiltelefon(Geschenk) *38,99 €


esphome:
  name: sonoff_4ch_pro   # Name of the Node.
  platform: ESP8266      # Even if the chip is a ESP8285, they have the same family.
  board: esp01_1m
  on_boot:
    priority: -100
    then:
      light.turn_on:
        id: status_led

wifi:
  ssid: WLAN
  password: PASSWORT

api:

logger:

ota:

# Enable Web server
web_server:
  port: 80

binary_sensor:
  - platform: gpio
    on_press:
      then:
        - switch.toggle: button_1
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "Sonoff 4CH Button 1"
  - platform: gpio
    on_press:
      then:
        - switch.toggle: button_2
    pin:
      number: GPIO9
      mode: INPUT_PULLUP
      inverted: True
    name: "Sonoff 4CH Button 2"
  - platform: gpio
    on_press:
      then:
        - switch.toggle: button_3
    pin:
      number: GPIO10
      mode: INPUT_PULLUP
      inverted: True
    name: "Sonoff 4CH Button 3"
  - platform: gpio
    on_press:
      then:
        - switch.toggle: button_4
    pin:
      number: GPIO14
      mode: INPUT_PULLUP
      inverted: True
    name: "Sonoff 4CH Button 4"
  - platform: status
    name: "Sonoff 4CH Status"

switch:
  - platform: gpio
    id: button_1
    name: "Sonoff 4CH Relay 1"
    pin: GPIO12
  - platform: gpio
    id: button_2
    name: "Sonoff 4CH Relay 2"
    pin: GPIO5
  - platform: gpio
    id: button_3
    name: "Sonoff 4CH Relay 3"
    pin: GPIO4
  - platform: gpio
    id: button_4
    name: "Sonoff 4CH Relay 4"
    pin: GPIO15

output:
  - platform: esp8266_pwm
    id: blue_led
    pin: GPIO13
    inverted: True

light:
  - platform: monochromatic
    id: status_led
    name: "Sonoff 4CH Blue LED"
    output: blue_led