forked from bemble/esphome_data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
garage-door.yaml
49 lines (46 loc) · 1.08 KB
/
garage-door.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
substitutions:
name: garage-door
static_ip: !secret ip_garage_door
packages:
wifi: !include common/wifi.yaml
device_base: !include common/device_base.yaml
esp32:
board: az-delivery-devkit-v4
binary_sensor:
- platform: gpio
name: Porte Garage Rue Fermée
id: garage_door_sensor
pin:
number: 14
inverted: False
device_class: garage_door
button:
- platform: template
name: Commande Porte Garage Rue
id: remote_command_button
icon: mdi:remote
on_press:
- switch.turn_on: garage_door_relay
- delay: 200ms
- switch.turn_off: garage_door_relay
switch:
- platform: gpio
internal: true
pin: 12
id: garage_door_relay
cover:
- platform: template
name: "Porte Garage Rue"
device_class: garage
lambda: |-
if (id(garage_door_sensor).state) {
return COVER_OPEN;
} else {
return COVER_CLOSED;
}
open_action:
- button.press: remote_command_button
close_action:
- button.press: remote_command_button
stop_action:
- button.press: remote_command_button