Hi, I’ve build a time-based cover with two relays per cover, one for power and one for the direction.
My problem is, that I want to have a short delay, before I directly change from up-movement to down-movement and vice versa, because my motor doesn’t like that. For now I’ve added a delay at the up- and down actions but that messes with time part of the component. Is there a way to perform the stop-action between a direction change or to add a delay before the up-down-actions get performed? Or do I have to write a custom cover in C++?
This is my current configuration:
esphome:
name: rolladen
platform: ESP32
board: nodemcu-32s
wifi:
ssid: "wifiSSID"
password: "wifiPassword"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "apSSID"
password: "apPassword"
captive_portal:
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
ota:
switch:
- platform: gpio
id: cover1_direction
pin: 26
- platform: gpio
id: cover1_power
pin: 25
########################
- platform: gpio
id: cover2_direction
pin: 33
- platform: gpio
id: cover2_power
pin: 32
cover:
- platform: time_based
name: "Cover_Garden"
id: garten
assumed_state: false
open_action:
- switch.turn_off: cover1_power
- delay: 1s
- switch.turn_on: cover1_direction
- delay: 200ms
- switch.turn_on: cover1_power
open_duration: 20s
close_action:
- switch.turn_off: cover1_power
- delay: 1s
- switch.turn_off: cover1_direction
- delay: 200ms
- switch.turn_on: cover1_power
close_duration: 9s
stop_action:
- switch.turn_off: cover1_power
- delay: 200ms
- switch.turn_off: cover1_direction
#########################################
- platform: time_based
name: "Cover_Road"
id: strasse
assumed_state: false
open_action:
- switch.turn_off: cover2_power
- delay: 1s
- switch.turn_on: cover2_direction
- delay: 200ms
- switch.turn_on: cover2_power
open_duration: 13s
close_action:
- switch.turn_off: cover2_power
- delay: 1s
- switch.turn_off: cover2_direction
- delay: 200ms
- switch.turn_on: cover2_power
close_duration: 13s
stop_action:
- switch.turn_off: cover2_power
- delay: 200ms
- switch.turn_off: cover2_direction
Thanks!