forked from esphome/esphome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test2.yaml
413 lines (390 loc) · 10.3 KB
/
test2.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
esphome:
name: $devicename
platform: ESP32
board: nodemcu-32s
build_path: build/test2
substitutions:
devicename: test2
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO25
clk_mode: GPIO0_IN
phy_addr: 0
power_pin: GPIO25
enable_mdns: false
manual_ip:
static_ip: 192.168.178.56
gateway: 192.168.178.1
subnet: 255.255.255.0
domain: .local
api:
i2c:
sda: 21
scl: 22
scan: False
spi:
clk_pin: GPIO21
mosi_pin: GPIO22
miso_pin: GPIO23
uart:
tx_pin: GPIO22
rx_pin: GPIO23
baud_rate: 115200
ota:
safe_mode: True
port: 3286
num_attempts: 15
logger:
level: DEBUG
deep_sleep:
run_duration: 20s
sleep_duration: 50s
wakeup_pin: GPIO39
wakeup_pin_mode: INVERT_WAKEUP
as3935_i2c:
irq_pin: GPIO12
mcp3008:
- id: 'mcp3008_hub'
cs_pin: GPIO12
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: homeassistant
entity_id: climate.living_room
attribute: temperature
id: ha_hello_world_temperature
- platform: ble_rssi
mac_address: AC:37:43:77:5F:4C
name: 'BLE Google Home Mini RSSI value'
- platform: ble_rssi
service_uuid: '11aa'
name: 'BLE Test Service 16'
- platform: ble_rssi
service_uuid: '11223344'
name: 'BLE Test Service 32'
- platform: ble_rssi
service_uuid: '11223344-5566-7788-99aa-bbccddeeff00'
name: 'BLE Test Service 128'
- platform: b_parasite
mac_address: F0:CA:F0:CA:01:01
humidity:
name: 'b-parasite Air Humidity'
temperature:
name: 'b-parasite Air Temperature'
moisture:
name: 'b-parasite Soil Moisture'
battery_voltage:
name: 'b-parasite Battery Voltage'
- platform: senseair
id: senseair0
co2:
name: 'SenseAir CO2 Value'
on_value:
then:
- senseair.background_calibration: senseair0
- senseair.background_calibration_result: senseair0
- senseair.abc_get_period: senseair0
- senseair.abc_enable: senseair0
- senseair.abc_disable: senseair0
update_interval: 15s
- platform: ruuvitag
mac_address: FF:56:D3:2F:7D:E8
humidity:
name: 'RuuviTag Humidity'
temperature:
name: 'RuuviTag Temperature'
pressure:
name: 'RuuviTag Pressure'
acceleration_x:
name: 'RuuviTag Acceleration X'
acceleration_y:
name: 'RuuviTag Acceleration Y'
acceleration_z:
name: 'RuuviTag Acceleration Z'
battery_voltage:
name: 'RuuviTag Battery Voltage'
tx_power:
name: 'RuuviTag TX Power'
movement_counter:
name: 'RuuviTag Movement Counter'
measurement_sequence_number:
name: 'RuuviTag Measurement Sequence Number'
- platform: as3935
lightning_energy:
name: 'Lightning Energy'
distance:
name: 'Distance Storm'
- platform: xiaomi_hhccjcy01
mac_address: 94:2B:FF:5C:91:61
temperature:
name: 'Xiaomi HHCCJCY01 Temperature'
moisture:
name: 'Xiaomi HHCCJCY01 Moisture'
illuminance:
name: 'Xiaomi HHCCJCY01 Illuminance'
conductivity:
name: 'Xiaomi HHCCJCY01 Soil Conductivity'
battery_level:
name: 'Xiaomi HHCCJCY01 Battery Level'
- platform: xiaomi_lywsdcgq
mac_address: 7A:80:8E:19:36:BA
temperature:
name: 'Xiaomi LYWSDCGQ Temperature'
humidity:
name: 'Xiaomi LYWSDCGQ Humidity'
battery_level:
name: 'Xiaomi LYWSDCGQ Battery Level'
- platform: xiaomi_lywsd02
mac_address: 3F:5B:7D:82:58:4E
temperature:
name: 'Xiaomi LYWSD02 Temperature'
humidity:
name: 'Xiaomi LYWSD02 Humidity'
battery_level:
name: 'Xiaomi LYWSD02 Battery Level'
- platform: xiaomi_cgg1
mac_address: 7A:80:8E:19:36:BA
temperature:
name: 'Xiaomi CGG1 Temperature'
humidity:
name: 'Xiaomi CGG1 Humidity'
battery_level:
name: 'Xiaomi CGG1 Battery Level'
- platform: xiaomi_gcls002
mac_address: '94:2B:FF:5C:91:61'
temperature:
name: 'GCLS02 Temperature'
moisture:
name: 'GCLS02 Moisture'
conductivity:
name: 'GCLS02 Soil Conductivity'
illuminance:
name: 'GCLS02 Illuminance'
- platform: xiaomi_hhccpot002
mac_address: '94:2B:FF:5C:91:61'
moisture:
name: 'HHCCPOT002 Moisture'
conductivity:
name: 'HHCCPOT002 Soil Conductivity'
- platform: xiaomi_lywsd03mmc
mac_address: 'A4:C1:38:4E:16:78'
bindkey: 'e9efaa6873f9f9c87a5e75a5f814801c'
temperature:
name: 'Xiaomi LYWSD03MMC Temperature'
humidity:
name: 'Xiaomi LYWSD03MMC Humidity'
battery_level:
name: 'Xiaomi LYWSD03MMC Battery Level'
- platform: xiaomi_cgd1
mac_address: 'A4:C1:38:D1:61:7D'
bindkey: 'c99d2313182473b38001086febf781bd'
temperature:
name: 'Xiaomi CGD1 Temperature'
humidity:
name: 'Xiaomi CGD1 Humidity'
battery_level:
name: 'Xiaomi CGD1 Battery Level'
- platform: xiaomi_jqjcy01ym
mac_address: '7A:80:8E:19:36:BA'
temperature:
name: 'JQJCY01YM Temperature'
humidity:
name: 'JQJCY01YM Humidity'
formaldehyde:
name: 'JQJCY01YM Formaldehyde'
battery_level:
name: 'JQJCY01YM Battery Level'
- platform: atc_mithermometer
mac_address: 'A4:C1:38:4E:16:78'
temperature:
name: 'ATC Temperature'
humidity:
name: 'ATC Humidity'
battery_level:
name: 'ATC Battery-Level'
battery_voltage:
name: 'ATC Battery-Voltage'
- platform: inkbird_ibsth1_mini
mac_address: 38:81:D7:0A:9C:11
temperature:
name: 'Inkbird IBS-TH1 Temperature'
humidity:
name: 'Inkbird IBS-TH1 Humidity'
battery_level:
name: 'Inkbird IBS-TH1 Battery Level'
- platform: sgp40
name: 'Workshop VOC'
update_interval: 5s
store_baseline: 'true'
- platform: mcp3008
update_interval: 5s
mcp3008_id: 'mcp3008_hub'
id: freezer_temp_source
reference_voltage: 3.19
number: 0
time:
- platform: homeassistant
on_time:
- at: '16:00:00'
then:
- logger.log: It's 16:00
esp32_touch:
setup_mode: True
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: homeassistant
entity_id: binary_sensor.hello
attribute: world
id: ha_hello_world_binary_attribute
- platform: ble_presence
mac_address: AC:37:43:77:5F:4C
name: 'ESP32 BLE Tracker Google Home Mini'
- platform: ble_presence
service_uuid: '11aa'
name: 'BLE Test Service 16 Presence'
- platform: ble_presence
service_uuid: '11223344'
name: 'BLE Test Service 32 Presence'
- platform: ble_presence
service_uuid: '11223344-5566-7788-99aa-bbccddeeff00'
name: 'BLE Test Service 128 Presence'
- platform: esp32_touch
name: 'ESP32 Touch Pad GPIO27'
pin: GPIO27
threshold: 1000
- platform: as3935
name: 'Storm Alert'
- platform: xiaomi_mue4094rt
name: 'MUE4094RT Motion'
mac_address: '7A:80:8E:19:36:BA'
timeout: '5s'
- platform: xiaomi_mjyd02yla
name: 'MJYD02YL-A Motion'
mac_address: '50:EC:50:CD:32:02'
bindkey: '48403ebe2d385db8d0c187f81e62cb64'
idle_time:
name: 'MJYD02YL-A Idle Time'
light:
name: 'MJYD02YL-A Light Status'
battery_level:
name: 'MJYD02YL-A Battery Level'
- platform: xiaomi_wx08zm
name: 'WX08ZM Activation State'
mac_address: '74:a3:4a:b5:07:34'
tablet:
name: 'WX08ZM Tablet Resource'
battery_level:
name: 'WX08ZM Battery Level'
esp32_ble_tracker:
on_ble_advertise:
- mac_address: AC:37:43:77:5F:4C
then:
- lambda: !lambda |-
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
- then:
- lambda: !lambda |-
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
on_ble_service_data_advertise:
- service_uuid: ABCD
then:
- lambda: !lambda |-
ESP_LOGD("main", "Length of service data is %i", x.size());
on_ble_manufacturer_data_advertise:
- manufacturer_id: ABCD
then:
- lambda: !lambda |-
ESP_LOGD("main", "Length of manufacturer data is %i", x.size());
#esp32_ble_beacon:
# type: iBeacon
# uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98'
status_led:
pin: GPIO2
text_sensor:
- platform: version
name: 'ESPHome Version'
icon: mdi:icon
id: version_sensor
on_value:
- if:
condition:
- api.connected:
then:
- lambda: !lambda |-
ESP_LOGD("main", "The state is %s=%s", x.c_str(), id(version_sensor).state.c_str());
- script.execute: my_script
- homeassistant.service:
service: notify.html5
data:
title: New Humidity
data_template:
message: The humidity is {{ my_variable }}%.
variables:
my_variable: |-
return id(version_sensor).state;
my_variable_str: |-
return "Hello World";
- homeassistant.service:
service: light.turn_on
data:
entity_id: light.my_light
- homeassistant.tag_scanned:
tag: 1234-abcd
- homeassistant.tag_scanned: 1234-abcd
- deep_sleep.enter:
sleep_duration: 30min
- deep_sleep.enter:
sleep_duration: !lambda "return 30 * 60 * 1000;"
- platform: template
name: 'Template Text Sensor'
lambda: |-
return {"Hello World"};
- platform: homeassistant
entity_id: sensor.hello_world2
id: ha_hello_world2
- platform: homeassistant
entity_id: sensor.hello_world3
id: ha_hello_world3
attribute: some_attribute
- platform: ble_scanner
name: Scanner
script:
- id: my_script
mode: single
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'
- id: my_script_queued
mode: queued
max_runs: 2
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'
- id: my_script_parallel
mode: parallel
max_runs: 2
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'
- id: my_script_restart
mode: restart
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'
stepper:
- platform: uln2003
id: my_stepper
pin_a: GPIO23
pin_b: GPIO27
pin_c: GPIO25
pin_d: GPIO26
sleep_when_done: no
step_mode: HALF_STEP
max_speed: 250 steps/s
# Optional:
acceleration: inf
deceleration: inf
interval:
interval: 5s
then:
- logger.log: 'Interval Run'
display: