2018-06-01 18:10:00 +02:00
|
|
|
Simple Garage Door
|
|
|
|
==================
|
|
|
|
|
2018-11-14 22:12:27 +01:00
|
|
|
.. seo::
|
2019-02-16 23:25:23 +01:00
|
|
|
:description: Instructions for setting up a simple garage door in ESPHome.
|
2021-11-16 03:19:33 +01:00
|
|
|
:image: window-open.svg
|
2018-11-14 22:12:27 +01:00
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
The following is a possible configuration file for garage doors that are controlled by two relays:
|
|
|
|
One for opening and another one for closing the garage door. When either one of them is turned on
|
|
|
|
for a short period of time, the close/open action begins.
|
|
|
|
|
2018-11-19 18:32:16 +01:00
|
|
|
.. code-block:: yaml
|
2018-06-01 18:10:00 +02:00
|
|
|
|
|
|
|
switch:
|
|
|
|
- platform: gpio
|
2024-05-07 07:40:12 +02:00
|
|
|
pin: GPIOXX
|
2018-06-01 18:10:00 +02:00
|
|
|
name: "Garage Door Open Switch"
|
|
|
|
id: open_switch
|
|
|
|
- platform: gpio
|
2024-05-07 07:40:12 +02:00
|
|
|
pin: GPIOXX
|
2018-06-01 18:10:00 +02:00
|
|
|
name: "Garage Door Close Switch"
|
|
|
|
id: close_switch
|
|
|
|
cover:
|
|
|
|
- platform: template
|
|
|
|
name: "Garage Door"
|
|
|
|
open_action:
|
|
|
|
# Cancel any previous action
|
2018-11-10 14:33:24 +01:00
|
|
|
- switch.turn_off: close_switch
|
2018-06-01 18:10:00 +02:00
|
|
|
# Turn the OPEN switch on briefly
|
2018-11-10 14:33:24 +01:00
|
|
|
- switch.turn_on: open_switch
|
2018-06-01 18:10:00 +02:00
|
|
|
- delay: 0.1s
|
2018-11-10 14:33:24 +01:00
|
|
|
- switch.turn_off: open_switch
|
2018-06-01 18:10:00 +02:00
|
|
|
close_action:
|
2018-11-10 14:33:24 +01:00
|
|
|
- switch.turn_off: open_switch
|
|
|
|
- switch.turn_on: close_switch
|
2018-06-01 18:10:00 +02:00
|
|
|
- delay: 0.1s
|
2018-11-10 14:33:24 +01:00
|
|
|
- switch.turn_off: close_switch
|
2018-06-01 18:10:00 +02:00
|
|
|
stop_action:
|
2018-11-10 14:33:24 +01:00
|
|
|
- switch.turn_off: close_switch
|
|
|
|
- switch.turn_off: open_switch
|
2018-06-01 18:10:00 +02:00
|
|
|
optimistic: true
|
2019-02-16 23:25:23 +01:00
|
|
|
assumed_state: true
|
2018-06-01 18:10:00 +02:00
|
|
|
|
|
|
|
See Also
|
2018-08-24 22:44:01 +02:00
|
|
|
--------
|
2018-06-01 18:10:00 +02:00
|
|
|
|
2024-06-27 01:55:41 +02:00
|
|
|
- :doc:`/automations/index`
|
2019-02-07 13:54:45 +01:00
|
|
|
- :doc:`/components/switch/gpio`
|
|
|
|
- :doc:`/components/cover/template`
|
|
|
|
- :ghedit:`Edit`
|