-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgarage_door.yaml
107 lines (89 loc) · 1.99 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
substitutions:
device_name: garage_door
upper_device_name: Garage Door
esphome:
name: $device_name
platform: ESP8266
board: d1_mini
wifi: !include include/wifi_iot.yaml
captive_portal:
# Enable logging
logger:
level: ERROR
# Enable Home Assistant API
# api:
ota:
web_server:
port: 80
mqtt: !include include/mqtt.yaml
i2c:
sda: D6
scl: D5
sensor:
- platform: am2320
temperature:
name: "Garage Temp"
expire_after: 30min
accuracy_decimals: 2
state_topic: $device_name/am2320/temperature/state
humidity:
name: "Garage Humidity"
expire_after: 30min
accuracy_decimals: 2
state_topic: $device_name/am2320/humidity/state
update_interval: 15min
- platform: wifi_signal
name: $upper_device_name WiFi Signal
update_interval: 30min
icon: mdi:wifi
output:
- platform: gpio
pin: D1
id: output1
button:
- platform: output
name: $upper_device_name Short Push
id: push_button
output: output1
duration: 600ms
- platform: output
name: $upper_device_name Long Push
id: long_push_button
output: output1
duration: 8.98s
- platform: restart
name: $upper_device_name Restart
binary_sensor:
- platform: gpio
pin: D7
name: "Garage Access Door"
device_class: door
filters:
- delayed_on_off: 20ms
- invert:
state_topic: $device_name/access_door/state
- platform: gpio
pin: D2
name: "Garage Door"
id: garage_door_sensor
device_class: door
filters:
- delayed_on_off: 20ms
- invert:
state_topic: $device_name/garage_door/state
cover:
- platform: template
name: "Garage Door"
device_class: garage
lambda: |-
if (id(garage_door_sensor).state) {
return COVER_OPEN;
} else {
return COVER_CLOSED;
}
open_action:
- button.press: push_button
close_action:
- button.press: push_button
stop_action:
- button.press: push_button