forked from Gifford47/HCPBridgeMqtt
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathesphome_beta.yaml
187 lines (168 loc) · 4.05 KB
/
esphome_beta.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# Variables to change the name of the entities
substitutions:
name: "hcpbridge"
friendly_name: "Garage Door"
connection_state: "${name} Connected"
relay_name: "${friendly_name} Relay state"
light: "${friendly_name} Light"
btn_vent: "${friendly_name} Vent"
btn_half: "${friendly_name} Half"
btn_impulse: "${friendly_name} Impulse"
sen_txt: "${friendly_name} State"
sw_vent: "${friendly_name} Venting"
sw_half: "${friendly_name} Open Half"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
libraries:
- emelianov/modbus-esp8266
platformio_options:
board_build.f_cpu: 240000000L
board_build.flash_mode: qio
monitor_speed: 9600
monitor_filters: esp32_exception_decoder
lib_ldf_mode: deep+
# board_build.f_flash: 40000000L
external_components:
source: github://14yannick/esphome-hcpbridge
refresh: 0s
esp32:
board: adafruit_feather_esp32s3
framework:
type: arduino
i2c:
sda: GPIO06
scl: GPIO05
scan: false
hcpbridge:
id: hcpbridge_id
rx_pin: 18 # optional, default=18
tx_pin: 17 # optional, default=17
#rts_pin : 1 # optional RTS pin to use if hardware automatic control flow is not available.
cover:
- platform: hcpbridge
name: ${friendly_name}
device_class: garage
id: garagedoor_cover
binary_sensor:
- platform: hcpbridge
is_connected:
name: "${connection_state}"
id: sensor_connected
relay_state:
name: "${relay_name}"
id: sensor_relay
#on_state:
#create your automation based on Garage Door Relay state
- platform: gpio
pin: GPIO40
name: "Motion"
device_class: motion
output:
- platform: hcpbridge
id: output_light
light:
- platform: hcpbridge
id: gd_light
output: output_light
name: ${light}
button:
- platform: hcpbridge
vent_button:
id: button_vent
name: "${btn_vent}"
impulse_button:
id: button_impulse
name: "${btn_impulse}"
half_button:
id: button_half
name: "${btn_half}"
text_sensor:
- platform: hcpbridge
id: sensor_templ_state
name: "${sen_txt}"
# filters:
# - substitute:
# - "Opening -> your text"
# - "Move venting -> your text"
# - "Move half -> your text"
# - "Closing -> your text"
# - "Open -> your text"
# - "Closed -> your text"
# - "Stopped -> your text"
# - "Half open -> your text"
# - "Venting -> your text"
# - "Unknown -> your text"
switch:
- platform: hcpbridge
vent_switch:
id: switch_vent
name: "${sw_vent}"
restore_mode: disabled
half_switch:
id: half_switch
name: "${sw_half}"
restore_mode: disabled
sensor:
- platform: bme280_i2c
temperature:
name: "BME280 Temperature"
pressure:
name: "BME280 Pressure"
humidity:
name: "BME280 Humidity"
address: 0x76 # can be 0x77 as well
update_interval: 30s
- platform: dht
pin: GPIO04
temperature:
name: "DHT Temperature"
humidity:
name: "DHT Humidity"
update_interval: 30s
- platform: ultrasonic
trigger_pin: GPIO07
echo_pin: GPIO08
name: "Ultrasonic Sensor"
api:
encryption:
key: !secret api_key
services:
- service: go_to_open
then:
- lambda: |-
id(garagedoor_cover).on_go_to_open();
- service: go_to_close
then:
- lambda: |-
id(garagedoor_cover).on_go_to_close();
- service: go_to_half
then:
- lambda: |-
id(garagedoor_cover).on_go_to_half();
- service: go_to_vent
then:
- lambda: |-
id(garagedoor_cover).on_go_to_vent();
- service: toggle
then:
- cover.toggle: garagedoor_cover
web_server:
port: 80
auth:
username: !secret web_username
password: !secret web_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "HCPBRIDGE"
password: !secret hcp_wifi_ap_password
captive_portal:
# Enable logging
logger:
level: DEBUG
baud_rate: 9600
# Example configuration entry
ota:
- platform: esphome