Sonoff Touch 2-Kanal als Jalousie-Schalter

Nanoleaf Lines Starter Kit, 9 Smarten LED RGBW Lichtleisten - Modulare WLAN 16 Mio. Farben Wandleuchte Innen, Musik & Bildschirm Sync, Funktioniert mit Alexa Google Apple, für Deko & Gaming
Nanoleaf Lines Starter Kit, 9 Smarten LED RGBW Lichtleisten - Modulare WLAN 16 Mio. Farben Wandleuchte Innen, Musik & Bildschirm Sync, Funktioniert mit Alexa Google Apple, für Deko & Gaming
Unverb. Preisempf.: 199,99 € (2.777,64 € / kg)
149,99 € (2.083,19 € / kg)
Sie sparen 50,00 € (25%)

Hier findet Ihr ein Beispiel, wie der Sonoff Touch (2-Kanal Variante) zum steuern eurer elektrischen Jalousiemotoren verwendet werden kann.

Alle Details zur Pinbelegung oder wie man den Wandschalter als einfachen Lichtschalter nutzen kann, könnt Ihr unter folgendem Link nachlesen:
/wiki/esphome/sonoff-touch-2-kanal-wandschalter-t0eu2c/

esphome:
  name: t0_schalter_Jalousie
  platform: ESP8266
  board: esp01_1m
  
wifi:
  ssid: !secret WLanSSID
  password: !secret WLanPassword

  ap:
    ssid: "Sonoff T1 Ch2 Fallback Hotspot"
    password: "123456789"

captive_portal:

logger:

api:
ota:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    id: button_1
    on_press:
      then:
        - lambda: |
            if (id(my_cover).current_operation == COVER_OPERATION_IDLE) {
              id(my_cover).open();
            } else {
              id(my_cover).stop();
            }


  - platform: gpio
    pin:
      number: GPIO9
      mode: INPUT_PULLUP
      inverted: True
    id: button_2
    on_press:
      then:
        - lambda: |
            if (id(my_cover).current_operation == COVER_OPERATION_IDLE) {
              id(my_cover).close();
            } else {
              id(my_cover).stop();
            }


  - platform: status
    name: "Jalousie Status"


switch:
  - platform: gpio
    name: "Jalousie rauf"
    pin: GPIO12
    interlock: &interlock [open_cover, close_cover]
    id: open_cover
    on_turn_on:
      - script.execute: switch_open_cover_off

  - platform: gpio
    name: "Jalousie runter"
    pin: GPIO5
    interlock: *interlock
    id: close_cover
    on_turn_on:
      - script.execute: switch_close_cover_off

cover:
  - platform: time_based
    name: "Jalousie"
    id: my_cover
    open_action:
      - switch.turn_on: open_cover
    open_duration: 22s
    close_action:
      - switch.turn_on: close_cover
    close_duration: 20s
    stop_action:
      - switch.turn_off: open_cover
      - switch.turn_off: close_cover
  

status_led:
  pin:
    number: GPIO13
    inverted: yes


script:
- id: switch_open_cover_off
  mode: restart
  then:
    - delay: 1min
    - switch.turn_off: open_cover

- id: switch_close_cover_off
  mode: restart
  then:
    - delay: 1min
    - switch.turn_off: close_cover