La vidéo
schéma

code esphome
esphome:
name: esp_volet_chambre_dorian
platform: ESP8266
board: d1_mini
wifi:
ssid: "VotreWifi"
password: "MotDePasseWifi"
ap:
ssid: "Esp Volet"
password: "UnMotDePasse"
captive_portal:
logger:
api:
ota:
# Relays
switch:
- platform: gpio
pin: D6
id: volet_up
inverted: true
interlock: &interlock_group [volet_up, volet_down]
restore_mode: always off
- platform: gpio
pin: D5
id: volet_down
interlock: *interlock_group
restore_mode: always off
inverted: true
# EndStops
binary_sensor:
- platform: gpio
pin: D1
id: endstop_up
- platform: gpio
pin: D2
id: endstop_down
# Cover
cover:
- platform: endstop
name: "Volet"
id: volet
open_action:
- switch.turn_on: volet_up
open_duration: 12s
open_endstop: endstop_up
close_action:
- switch.turn_on: volet_down
close_duration: 6s
close_endstop: endstop_down
stop_action:
- switch.turn_off: volet_up
- switch.turn_off: volet_down
max_duration: 13s