Hi,
I am trying the new platform component for ESPHome released august 17th,
It feels promising, though I can get it to perfectly match my setup.
My garage door works by itself via toggle button, like every single door I know, you press it it opens, you press it it stops, you press it, it closes, it stops automatically when closed or opened.
So far everything clear here, I need a relay to toggle this door, I have it,
I need a new push button that goes to the ESP Chip so the ESP can trace and understand all the movements, okey, I have it
I added two extra reed sensors to detect the endstops on the ESP chip to have extra feedback, everything great in terms of hardware I think, there wouldn’t be any extra thing that I could need to manage this door and know exactly where it is (In the future I would like to open this gate to a certain percentage for pedestrian access, that’s why I installed both sensors)
I decided to gave it a try to this feedback cover, that looks exactly to give me what I would need to develop this. I had it working within minutes but here are some flaws:
I need to give a action to open, to close, and to stop. The actions, in this door, would always be the same, therefore, can do some errors.
I assigned to the three actions the relay one to toggle it on and off, great, it works.
Also when the door is open, the open button is greyed out, GREAT, but for example,
The stop button when the door is stopped is not greyed out, and if you press stop when the door is stopped, the door will start moving.
Also when the door is stopped, both open and close buttons are available, by toggling the door when it is stopped halfway, it would only go in the reverse direction than it was previously going.
Also if the door is opening, the closing button is available, and it wouldn’t close the door, it would just stop it.
To summarise it, most of the situations could be dealt with the option to grey out the xxxx button if door state is xxx.
Or to tell the Home assistant system that this is a toggle door and therefore the open close stop buttons are redundant and would not work at all and to go better with toggle button?.
Also please note that most of the things out there are for cover template platform, and would only work with template covers
###################
button:
- platform: restart
name: "$device_name Restart"
switch:
- platform: gpio
pin: GPIO05
name: "toggle_relay_gate_TEST"
restore_mode: always_off
id: r1
on_turn_on:
- delay: 300ms
- switch.turn_off: r1
binary_sensor:
- platform: gpio
name: gate_push_physical_TEST
filters:
- delayed_on: 100ms
pin:
number: GPIO12
mode: INPUT_PULLUP
inverted: True
id: Remote
on_press:
- cover.toggle: gate_1
- platform: gpio
pin:
number: GPIO4
mode: INPUT_PULLUP
inverted: true
id: endstop_opened
name: gate_opened_TEST
filters:
- delayed_on: 100ms
- platform: gpio
pin:
number: GPIO14
mode: INPUT_PULLUP
inverted: true
id: endstop_closed
name: gate_closed_TEST
filters:
- delayed_on: 100ms
- platform: status
name: "Status $device_name"
cover:
- platform: feedback
name: "Gate"
device_class: gate
id: gate_1
open_action:
- switch.turn_on: r1
close_action:
- switch.turn_on: r1
stop_action:
# - if:
# condition:
# - state.cover #Cover is at opening or closing state
then:
- switch.turn_on: r1
open_endstop: endstop_opened
close_endstop: endstop_closed
open_duration: 10s
close_duration: 10s
has_built_in_endstop: true