forked from Yonsm/.homeassistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.yaml
executable file
·668 lines (623 loc) · 33.5 KB
/
configuration.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
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
homeassistant:
name: 智能物联
latitude: 30.23927
longitude: 120.05633
elevation: 32
unit_system: metric
time_zone: Asia/Shanghai
customize: !include customize.yaml
# logger:
# default: warning
# logs:
# custom_components.zhibot: debug
# custom_components.mrbond_airer: debug
#homeassistant.components.homekit: debug
#pyhap: debug
#homeassistant.components.braviatv: debug
#braviarc.braviarc: debug
system_health:
frontend:
#mobile_app:
config:
http:
base_url: !secret http_base_url
ssl_key: ~/.homeassistant/private.key
ssl_certificate: ~/.homeassistant/fullchain.pem
history:
exclude:
domains:
- sun
- group
- script
- climate
- automation
- input_text
- input_select
- input_boolean
logbook:
sun:
tts:
- platform: baidu
app_id: !secret baidu_app_id
api_key: !secret baidu_api_key
secret_key: !secret baidu_secret_key
group: !include groups.yaml
automation: !include_dir_merge_list automations
#script: !include scripts.yaml
#scene: !include scenes.yaml
mqtt:
broker: localhost
modbus:
type: rtuovertcp
host: ModBus
port: 8899
homekit:
filter:
exclude_domains:
- script
- automation
- input_boolean
- device_tracker
exclude_entities:
- light.ke_ting_tong_deng_2
- light.can_ting_tong_deng_2
- binary_sensor.switch_158d0001e59b33
- binary_sensor.switch_158d000201a73f
- sensor.zhu_wo_er_yang_hua_tan
- climate.ke_ting_di_nuan
- climate.zhu_wo_di_nuan
entity_config:
switch.can_ting_chu_shi_ji:
type: outlet
switch.yi_gui_chu_shi_ji:
type: outlet
media_player.zhu_wo_dian_shi:
feature_list:
- feature: on_off
media_player.ke_ting_dian_shi:
feature_list:
- feature: on_off
#mkdir -p /var/lib/misc
#echo "/bin/ln -s /tmp/dnsmasq.leases /var/lib/misc/dnsmasq.leases" >> /etc/storage/started_script.sh
asuswrt:
host: Router
username: admin
password: !secret http_password
device_tracker:
- platform: asuswrt
interval_seconds: 120
new_device_defaults:
track_new_devices: false
# - platform: ping
# hosts:
# x9300d: 192.168.1.7
person:
- name: 爸爸
id: baba
device_trackers:
- device_tracker.aphone
#- device_tracker.yphone
- name: 妈妈
id: mama
device_trackers:
- device_tracker.zphone
# - name: 爷爷
# id: yeye
# device_trackers:
# - device_tracker.xphone
- name: 阿姨
id: ayi
device_trackers:
- device_tracker.cphone
binary_sensor:
- platform: mqtt
device_class: motion
state_topic: NodeMCU6/digital
payload_on: 1
payload_off: 0
name: 主卧感应
availability_topic: NodeMCU6/status
weather:
- platform: caiyun
name: 天气
sensor:
- platform: mqtt
name: 阳台温度
device_class: temperature
state_topic: NodeMCU2/temperature
unit_of_measurement: °C
availability_topic: NodeMCU2/status
- platform: mqtt
name: 阳台湿度
device_class: humidity
state_topic: NodeMCU2/humidity
unit_of_measurement: '%'
availability_topic: NodeMCU2/status
- platform: mqtt
name: 阳台颗粒物
icon: mdi:blur
state_topic: NodeMCU2/pm2dot5
unit_of_measurement: μg/m³
availability_topic: NodeMCU2/status
- platform: mqtt
name: 书房温度
device_class: temperature
state_topic: NodeMCU3/temperature
unit_of_measurement: °C
availability_topic: NodeMCU3/status
- platform: mqtt
name: 书房湿度
device_class: humidity
state_topic: NodeMCU3/humidity
unit_of_measurement: '%'
availability_topic: NodeMCU3/status
- platform: mqtt
name: 书房二氧化碳
icon: mdi:periodic-table-co2
state_topic: NodeMCU3/co2
unit_of_measurement: ppm
availability_topic: NodeMCU3/status
- platform: mqtt
name: 书房亮度
device_class: illuminance
state_topic: NodeMCU3/lux
unit_of_measurement: lm
availability_topic: NodeMCU3/status
- platform: mqtt
name: 主卧亮度
device_class: illuminance
state_topic: NodeMCU6/analog
availability_topic: NodeMCU6/status
#unit_of_measurement: lm
- platform: mqtt
name: 儿童房温度
device_class: temperature
state_topic: NodeMCU7/temperature
unit_of_measurement: °C
availability_topic: NodeMCU7/status
- platform: mqtt
name: 儿童房湿度
device_class: humidity
state_topic: NodeMCU7/humidity
unit_of_measurement: '%'
availability_topic: NodeMCU7/status
- platform: mqtt
name: 儿童房颗粒物
icon: mdi:blur
state_topic: NodeMCU7/pm2dot5
unit_of_measurement: μg/m³
availability_topic: NodeMCU7/status
- platform: mqtt
name: 儿童房二氧化碳
icon: mdi:periodic-table-co2
state_topic: NodeMCU7/co2
unit_of_measurement: ppm
availability_topic: NodeMCU7/status
# - platform: phicomm
# name: AirCat
# username: !secret phicomm_username
# password: !secret phicomm_password
- platform: aircat
name: [['餐厅颗粒物', '餐厅甲醛', '餐厅温度', '餐厅湿度']]
mac: ['B0F8931EA148'] ##, 'B0F893249132']
- platform: template
sensors:
ci_wo_wen_du:
friendly_name: 次卧温度
device_class: temperature
value_template: '{{ state_attr("fan.ci_wo_jing_hua_qi", "temperature") }}'
unit_of_measurement: °C
ci_wo_shi_du:
friendly_name: 次卧湿度
device_class: humidity
value_template: '{{ state_attr("fan.ci_wo_jing_hua_qi", "humidity") }}'
unit_of_measurement: '%'
ci_wo_ke_li_wu:
friendly_name: 次卧颗粒物
value_template: '{{ state_attr("fan.ci_wo_jing_hua_qi", "aqi") }}'
unit_of_measurement: μg/m³
icon_template: mdi:blur
ke_ting_wen_du:
friendly_name: 客厅温度
device_class: temperature
value_template: '{{ state_attr("fan.ke_ting_xin_feng_ji", "temperature") }}'
unit_of_measurement: °C
ke_ting_shi_du:
friendly_name: 客厅湿度
device_class: humidity
value_template: '{{ state_attr("fan.ke_ting_xin_feng_ji", "humidity") }}'
unit_of_measurement: '%'
ke_ting_ke_li_wu:
friendly_name: 客厅颗粒物
value_template: '{{ state_attr("fan.ke_ting_xin_feng_ji", "aqi") }}'
unit_of_measurement: μg/m³
icon_template: mdi:blur
ke_ting_er_yang_hua_tan:
friendly_name: 客厅二氧化碳
value_template: '{{ state_attr("fan.ke_ting_xin_feng_ji", "co2") }}'
unit_of_measurement: ppm
icon_template: mdi:periodic-table-co2
zhu_wo_wen_du:
friendly_name: 主卧温度
device_class: temperature
value_template: '{{ state_attr("fan.zhu_wo_xin_feng_ji", "temperature") }}'
unit_of_measurement: °C
zhu_wo_shi_du:
friendly_name: 主卧湿度
device_class: humidity
value_template: '{{ state_attr("fan.zhu_wo_xin_feng_ji", "humidity") }}'
unit_of_measurement: '%'
zhu_wo_ke_li_wu:
friendly_name: 主卧颗粒物
value_template: '{{ state_attr("fan.zhu_wo_xin_feng_ji", "aqi") }}'
unit_of_measurement: μg/m³
icon_template: mdi:blur
zhu_wo_er_yang_hua_tan:
friendly_name: 主卧二氧化碳
value_template: '{{ state_attr("fan.zhu_wo_xin_feng_ji", "co2") }}'
unit_of_measurement: ppm
icon_template: mdi:periodic-table-co2
feng_shan_wen_du:
friendly_name: 风扇温度
device_class: temperature
value_template: '{{ state_attr("fan.er_tong_fang_feng_shan", "temperature") }}'
unit_of_measurement: °C
# ke_ting_kong_diao_mo_shi:
# friendly_name: 客厅空调模式
# value_template: '{% set mode = state_attr("climate.ke_ting_kong_diao", "fan_mode") %}{% if is_state("climate.ke_ting_kong_diao", "off") %}off{% elif mode == "自动" %}自{% elif mode == "一档" %}一{% elif mode == "二档" %}二{% elif mode == "三档" %}三{% elif mode == "四档" %}四{% elif mode == "五档" %}五{% else %}{{ mode }}{% endif %}'
# zhu_wo_kong_diao_mo_shi:
# friendly_name: 主卧空调模式
# value_template: '{% set mode = state_attr("climate.zhu_wo_kong_diao", "fan_mode") %}{% if is_state("climate.zhu_wo_kong_diao", "off") %}off{% elif mode == "自动" %}自{% elif mode == "一档" %}一{% elif mode == "二档" %}二{% elif mode == "三档" %}三{% elif mode == "四档" %}四{% elif mode == "五档" %}五{% else %}{{ mode }}{% endif %}'
# er_tong_fang_kong_diao_mo_shi:
# friendly_name: 儿童房空调模式
# value_template: '{% set mode = state_attr("climate.er_tong_fang_kong_diao", "fan_mode") %}{% if is_state("climate.er_tong_fang_kong_diao", "off") %}off{% elif mode == "自动" %}自{% elif mode == "一档" %}一{% elif mode == "二档" %}二{% elif mode == "三档" %}三{% elif mode == "四档" %}四{% elif mode == "五档" %}五{% else %}{{ mode }}{% endif %}'
# shu_fang_kong_diao_mo_shi:
# friendly_name: 书房空调模式
# value_template: '{% set mode = state_attr("climate.shu_fang_kong_diao", "fan_mode") %}{% if is_state("climate.shu_fang_kong_diao", "off") %}off{% elif mode == "low" %}一{% elif mode == "mid" %}二{% elif mode == "high" %}三{% elif mode == "highest" %}四{% else %}{{ mode }}{% endif %}'
# er_tong_fang_feng_shan_mo_shi:
# friendly_name: 儿童房风扇模式
# value_template: '{% set mode = state_attr("fan.er_tong_fang_feng_shan", "speed_level") %}{% if is_state("fan.er_tong_fang_feng_shan", "off") %}off{% elif mode == "Level 1" %}一{% elif mode == "Level 2" %}二{% elif mode == "Level 3" %}三{% elif mode == "Level 4" %}四{% else %}{{ mode }}{% endif %}'
# shu_fang_feng_shan_mo_shi:
# friendly_name: 书房风扇模式
# value_template: '{% set mode = state_attr("fan.shu_fang_feng_shan", "speed_level") %}{% if is_state("fan.shu_fang_feng_shan", "off") %}off{% elif mode == "Level 1" %}一{% elif mode == "Level 2" %}二{% elif mode == "Level 3" %}三{% elif mode == "Level 4" %}四{% else %}{{ mode }}{% endif %}'
# ke_ting_xin_feng_ji_mo_shi:
# friendly_name: 客厅新风机模式
# value_template: '{% set mode = state_attr("fan.ke_ting_xin_feng_ji", "speed") %}{% if is_state("fan.ke_ting_xin_feng_ji", "off") %}off{% elif mode == "Auto" %}自{% elif mode == "Silent" %}静{% elif mode == "Interval" %}间{% elif mode == "Low" %}一{% elif mode == "Middle" %}二{% elif mode == "Strong" %}三{% else %}{{ mode }}{% endif %}'
# zhu_wo_xin_feng_ji_mo_shi:
# friendly_name: 主卧新风机模式
# value_template: '{% set mode = state_attr("fan.zhu_wo_xin_feng_ji", "speed") %}{% if is_state("fan.zhu_wo_xin_feng_ji", "off") %}off{% elif mode == "Auto" %}自{% elif mode == "Silent" %}静{% elif mode == "Interval" %}间{% elif mode == "Low" %}一{% elif mode == "Middle" %}二{% elif mode == "Strong" %}三{% else %}{{ mode }}{% endif %}'
# ci_wo_jing_hua_qi_mo_shi:
# friendly_name: 次卧净化器模式
# value_template: '{% set mode = state_attr("fan.ci_wo_jing_hua_qi", "speed") %}{% if is_state("fan.ci_wo_jing_hua_qi", "off") %}off{% elif mode == "Auto" %}自{% elif mode == "Silent" %}静{% elif mode == "Favorite" %}{{ state_attr("fan.ci_wo_jing_hua_qi", "favorite_level") }}{% else %}{{ mode }}{% endif %}'
# shu_fang_jing_hua_qi_mo_shi:
# friendly_name: 书房净化器模式
# value_template: '{% set mode = state_attr("fan.shu_fang_jing_hua_qi", "speed") %}{% if is_state("fan.shu_fang_jing_hua_qi", "off") %}off{% elif mode == "low" %}一{% elif mode == "medium" %}二{% elif mode == "high" %}三{% else %}{{ mode }}{% endif %}'
# can_ting_jing_hua_qi_mo_shi:
# friendly_name: 餐厅净化器模式
# value_template: '{% set mode = state_attr("fan.can_ting_jing_hua_qi", "speed") %}{% if is_state("fan.can_ting_jing_hua_qi", "off") %}off{% elif mode == "low" %}一{% elif mode == "medium" %}二{% elif mode == "high" %}三{% else %}{{ mode }}{% endif %}'
# zhu_wo_jing_hua_qi_mo_shi:
# friendly_name: 主卧净化器模式
# value_template: '{% set mode = state_attr("fan.zhu_wo_jing_hua_qi", "speed") %}{% if is_state("fan.zhu_wo_jing_hua_qi", "off") %}off{% elif mode == "low" %}一{% elif mode == "medium" %}二{% elif mode == "high" %}三{% else %}{{ mode }}{% endif %}'
# er_tong_fang_jing_hua_qi_mo_shi:
# friendly_name: 儿童房净化器模式
# value_template: '{% set mode = state_attr("fan.er_tong_fang_jing_hua_qi", "speed") %}{% if is_state("fan.er_tong_fang_jing_hua_qi", "off") %}off{% elif mode == "low" %}一{% elif mode == "medium" %}二{% elif mode == "high" %}三{% else %}{{ mode }}{% endif %}'
switch:
- platform: wake_on_lan
name: 网络存储
mac: 00-11-32-6B-75-F7
#broadcast_address: 192.168.1.255
host: Station
turn_off:
service: shell_command.shutdown_station
- platform: mqtt
name: 洗手间排气扇
state_topic: Hassmart2/relay/1
command_topic: Hassmart2/relay/1/set
availability_topic: Hassmart2/status
- platform: mqtt2
name: 音箱
state_topic: NodeMCU3/relay/0
command_topic: NodeMCU3/relay/0/set
availability_topic: NodeMCU3/status
value_template: '{% if value == "关闭" %}OFF{% else %}ON{% endif %}'
icon_template: '{% if value == "关闭" %}mdi:speaker-off{% elif value == "蓝牙" %}mdi:speaker-bluetooth{% elif value == "光纤" %}mdi:speaker-wireless{% elif value == "优盘" %}mdi:usb{% elif value == "辅助" %}mdi:video-input-component{% else %}mdi:speaker{% endif %}'
- platform: broadlink
host: Outlet
mac: 34:EA:34:B8:36:AC
friendly_name: 餐厅除湿机
type: spmini2
# - platform: broadlink
# host: Outlet2
# mac: 78:0f:77:cc:cc:be
# friendly_name: 衣柜除湿机
# type: spmini2
- platform: broadlink
friendly_name: 万能遥控
host: Remote
mac: 34:EA:34:58:73:5D
type: rm2_pro_plus
- platform: broadlink
friendly_name: 红外遥控
host: Remote2
mac: 78:0F:77:47:AA:8F
type: rm_mini
- platform: template
switches:
tou_ying_yi:
friendly_name: 投影仪
value_template: '{{ is_state("device_tracker.projector", "home") }}'
icon_template: mdi:projector
turn_on:
service: broadlink.send
data:
host: Remote
packet: 'JgBQAAABKZMTNxQ3ExIUERQSExITEhM3FBITEhM3ExITOBM3EzcUNxM3EzcUNxMSEzcTExMSExITEhMSExIUNxMSEzcUNxM3EwAFGQABJUkTAA0FAAAAAAAAAAA='
turn_off:
service: broadlink.send
data:
host: Remote
packet: 'JgBQAAABKZMTNxQ3ExIUERQSExITEhM3FBITEhM3ExITOBM3EzcUNxM3EzcUNxMSEzcTExMSExITEhMSExIUNxMSEzcUNxM3EwAFGQABJUkTAA0FAAAAAAAAAAA='
# zhu_wo_dian_shi:
# friendly_name: 主卧电视电源
# value_template: '{{ is_state("device_tracker.x9300d", "home") }}'
# turn_on:
# service: mqtt.publish
# data:
# topic: NodeMCU6/irout/set
# payload: '2416,592,1210,594,608,618,1186,616,586,592,1210,618,584,618,586,616,1186,618,584,618,584,616,586,592,608,1,2,38'
# turn_off:
# service: shell_command.power_off_x9300d
yeelight:
devices:
Lamp:
name: 书房台灯
model: bslamp1
Lamp2:
name: 儿童房台灯
model: mono1
light:
- platform: mqtt
name: 客厅筒灯
state_topic: Hassmart1/relay/0
command_topic: Hassmart1/relay/0/set
availability_topic: Hassmart1/status
- platform: mqtt
name: 餐厅筒灯
state_topic: Hassmart1/relay/1
command_topic: Hassmart1/relay/1/set
availability_topic: Hassmart1/status
- platform: mqtt
name: 洗手间灯
state_topic: Hassmart2/relay/0
command_topic: Hassmart2/relay/0/set
availability_topic: Hassmart2/status
- platform: mqtt
name: 过道背景灯
state_topic: Sonoff1/relay/0
command_topic: Sonoff1/relay/0/set
availability_topic: Sonoff1/status
- platform: mqtt
name: 餐厅筒灯2
state_topic: Sonoff1/relay/1
command_topic: Sonoff1/relay/1/set
availability_topic: Sonoff1/status
- platform: mqtt
name: 客厅筒灯2
state_topic: Sonoff1/relay/2
command_topic: Sonoff1/relay/2/set
availability_topic: Sonoff1/status
- platform: mqtt
name: 主卧灯
state_topic: NodeMCU6/analog
state_value_template: '{% if (value | int > 1000) or ((value | int > 600) and is_state("sun.sun", "below_horizon")) %}3526,1658,426,418,426,1292,426,420,426,1288,428,418,426,1290,430,418,426,1290,428,418,426,418,426,416,426,1290,428,416,430,1290,428,1290,428,418,428,1288,428,416,428,418,426,418,428,1288,428,1288,428,1290,428,418,428,1290,428,418,428,1290,428,416,428,1290,428,1290,428,416,428,418,426,418,428,416,428,418,426,416,428,418,426,416,428,416,428,418,426,1292,426,418,428,1290,428,416,428,1292,424,1292,424,1294,424,418,426,1290,426,420,424,418,426,420,424,422,424,1294,424,420,424,420,424,1294,424,420,424,422,422,422,422,1298,422,422,422,1296,422,422,422,1,2,38{% else %}3528,1658,426,418,426,1292,380,462,382,1334,382,464,382,1338,380,462,382,1336,382,462,382,462,382,462,382,1336,382,462,382,1336,380,1336,382,464,382,1338,378,462,384,462,382,464,380,1336,382,1336,382,1336,382,462,382,1334,384,464,382,1336,382,462,382,1336,382,1336,382,464,382,462,382,464,382,464,380,462,382,462,382,464,382,464,380,464,382,464,382,464,380,1338,380,462,382,464,382,462,380,464,380,464,380,464,380,1334,382,464,380,464,380,464,380,464,382,1336,382,464,382,462,382,1334,382,464,382,464,382,464,380,1336,382,1336,382,464,382,1338,380,1,2,38{% endif %}'
command_topic: NodeMCU6/irout/set
availability_topic: NodeMCU6/status
payload_on: 3526,1658,426,418,426,1292,426,420,426,1288,428,418,426,1290,430,418,426,1290,428,418,426,418,426,416,426,1290,428,416,430,1290,428,1290,428,418,428,1288,428,416,428,418,426,418,428,1288,428,1288,428,1290,428,418,428,1290,428,418,428,1290,428,416,428,1290,428,1290,428,416,428,418,426,418,428,416,428,418,426,416,428,418,426,416,428,416,428,418,426,1292,426,418,428,1290,428,416,428,1292,424,1292,424,1294,424,418,426,1290,426,420,424,418,426,420,424,422,424,1294,424,420,424,420,424,1294,424,420,424,422,422,422,422,1298,422,422,422,1296,422,422,422,1,2,38
payload_off: 3528,1658,426,418,426,1292,380,462,382,1334,382,464,382,1338,380,462,382,1336,382,462,382,462,382,462,382,1336,382,462,382,1336,380,1336,382,464,382,1338,378,462,384,462,382,464,380,1336,382,1336,382,1336,382,462,382,1334,384,464,382,1336,382,462,382,1336,382,1336,382,464,382,462,382,464,382,464,380,462,382,462,382,464,382,464,380,464,382,464,382,464,380,1338,380,462,382,464,382,462,380,464,380,464,380,464,380,1334,382,464,380,464,380,464,380,464,382,1336,382,464,382,462,382,1334,382,464,382,464,382,464,380,1336,382,1336,382,464,382,1338,380,1,2,38
brightness_state_topic: NodeMCU6/analog
brightness_command_topic: NodeMCU6_/analog/set
brightness_scale: 1024
- platform: mqtt
name: 儿童房灯
command_topic: NodeMCU7/irout/set
availability_topic: NodeMCU7/status
payload_on: 3526,1658,426,418,426,1292,426,420,426,1288,428,418,426,1290,430,418,426,1290,428,418,426,418,426,416,426,1290,428,416,430,1290,428,1290,428,418,428,1288,428,416,428,418,426,418,428,1288,428,1288,428,1290,428,418,428,1290,428,418,428,1290,428,416,428,1290,428,1290,428,416,428,418,426,418,428,416,428,418,426,416,428,418,426,416,428,416,428,418,426,1292,426,418,428,1290,428,416,428,1292,424,1292,424,1294,424,418,426,1290,426,420,424,418,426,420,424,422,424,1294,424,420,424,420,424,1294,424,420,424,422,422,422,422,1298,422,422,422,1296,422,422,422,1,2,38
payload_off: 3528,1658,426,418,426,1292,380,462,382,1334,382,464,382,1338,380,462,382,1336,382,462,382,462,382,462,382,1336,382,462,382,1336,380,1336,382,464,382,1338,378,462,384,462,382,464,380,1336,382,1336,382,1336,382,462,382,1334,384,464,382,1336,382,462,382,1336,382,1336,382,464,382,462,382,464,382,464,380,462,382,462,382,464,382,464,380,464,382,464,382,464,380,1338,380,462,382,464,382,462,380,464,380,464,380,464,380,1334,382,464,380,464,380,464,380,464,382,1336,382,464,382,462,382,1334,382,464,382,464,382,464,380,1336,382,1336,382,464,382,1338,380,1,2,38
shell_command:
shutdown_station: 'ssh root@Station shutdown -h now'
# power_off_x9300d: 'adb connect x9300d; adb -s x9300d shell reboot -p'
# power_off_x9400d: 'adb connect x9400e; adb -s x9400e shell reboot -p'
xiaomi_aqara:
#interface: 192.168.2.40
gateways:
- key: 3ECB50168D7F4AEB
#mac: 34CE0090901A
#host: ZigBee
vacuum:
- platform: xiaomi_miio
name: 扫地机
host: Vacuum
token: !secret vacuum_token
fan:
- platform: viomi_washer
name: 洗衣机
host: Washer
token: !secret washer_token
- platform: xiaomi_miio
name: 次卧净化器
host: Purifier
model: zhimi.airpurifier.m1
token: !secret purifier_token
- platform: xiaomi_fan
name: 儿童房风扇
host: Fan
model: zhimi.fan.v3
token: !secret fan_token
- platform: xiaomi_fan
name: 书房风扇
host: Fan2
model: zhimi.fan.sa1
token: !secret fan2_token
- platform: xiaomi_miio
name: 客厅新风机
host: Fresher
model: zhimi.airfresh.va2
token: !secret fresher_token
- platform: xiaomi_miio
name: 主卧新风机
host: Fresher2
model: zhimi.airfresh.va2
token: !secret fresher2_token
- platform: mqtt
name: 书房净化器
state_topic: NodeMCU4/relay/0
command_topic: NodeMCU4/relay/0/set
availability_topic: NodeMCU4/status
oscillation_state_topic: NodeMCU4/relay/1
oscillation_command_topic: NodeMCU4/relay/1/set
speed_state_topic: NodeMCU4/relay/0
speed_command_topic: NodeMCU4/relay/0/set
state_value_template: '{% if value == "0" %}OFF{% else %}ON{% endif %}'
payload_low_speed: '1'
payload_medium_speed: '2'
payload_high_speed: '3'
payload_oscillation_on: 'ON'
payload_oscillation_off: 'OFF'
- platform: mqtt
name: 餐厅净化器
state_topic: NodeMCU5/relay/0
command_topic: NodeMCU5/relay/0/set
availability_topic: NodeMCU5/status
oscillation_state_topic: NodeMCU5/relay/1
oscillation_command_topic: NodeMCU5/relay/1/set
speed_state_topic: NodeMCU5/relay/0
speed_command_topic: NodeMCU5/relay/0/set
state_value_template: '{% if value == "0" %}OFF{% else %}ON{% endif %}'
payload_low_speed: '1'
payload_medium_speed: '5'
payload_high_speed: '4'
payload_oscillation_on: 'ON'
payload_oscillation_off: 'OFF'
- platform: mqtt
name: 主卧净化器
state_topic: NodeMCU6/relay/0
command_topic: NodeMCU6/relay/0/set
availability_topic: NodeMCU6/status
oscillation_state_topic: NodeMCU6/relay/1
oscillation_command_topic: NodeMCU6/relay/1/set
speed_state_topic: NodeMCU6/relay/0
speed_command_topic: NodeMCU6/relay/0/set
state_value_template: '{% if value == "0" %}OFF{% else %}ON{% endif %}'
payload_low_speed: '1'
payload_medium_speed: '5'
payload_high_speed: '6'
payload_oscillation_on: 'ON'
payload_oscillation_off: 'OFF'
- platform: mqtt
name: 儿童房净化器
state_topic: NodeMCU7/relay/0
command_topic: NodeMCU7/relay/0/set
availability_topic: NodeMCU7/status
oscillation_state_topic: NodeMCU7/relay/1
oscillation_command_topic: NodeMCU7/relay/1/set
speed_state_topic: NodeMCU7/relay/0
speed_command_topic: NodeMCU7/relay/0/set
state_value_template: '{% if value == "0" %}OFF{% else %}ON{% endif %}'
payload_low_speed: '1'
payload_medium_speed: '5'
payload_high_speed: '6'
payload_oscillation_on: 'ON'
payload_oscillation_off: 'OFF'
- platform: mqtt
name: 主卧壁扇
availability_topic: NodeMCU6/status
command_topic: NodeMCU6/irout/set
payload_on: 9150,4770,380,812,438,782,410,754,436,756,412,778,812,380,812,408,782,384,410,806,810,358,408,808,782,410,782,410,784,408,784,408,782,382,382,814,410,806,384,780,386,806,410,762,432,808,806,386,402,762,808,382,810,384,808,382,808,382,812,380,810,410,382,808,784,382,1208,8334,9130,4796,356,814,408,782,408,782,410,782,408,782,810,382,808,384,808,382,410,782,808,382,412,780,810,382,810,384,832,358,808,382,810,382,384,810,412,780,412,778,412,780,412,780,412,780,810,384,408,782,810,382,810,382,810,382,808,382,834,358,810,382,410,780,810,382,1210,8338,9126,4796,382,812,382,808,382,784,408,808,382,786,806,410,782,410,780,412,382,808,782,410,358,832,758,434,758,434,780,412,758,434,758,434,378,788,386,808,384,830,360,830,360,804,388,832,760,432,360,830,762,430,762,432,760,432,760,430,762,430,762,428,388,804,784,408,1186,1,2,38
payload_off: 9150,4770,380,812,438,782,410,754,436,756,412,778,812,380,812,408,782,384,410,806,810,358,408,808,782,410,782,410,784,408,784,408,782,382,382,814,410,806,384,780,386,806,410,762,432,808,806,386,402,762,808,382,810,384,808,382,808,382,812,380,810,410,382,808,784,382,1208,8334,9130,4796,356,814,408,782,408,782,410,782,408,782,810,382,808,384,808,382,410,782,808,382,412,780,810,382,810,384,832,358,808,382,810,382,384,810,412,780,412,778,412,780,412,780,412,780,810,384,408,782,810,382,810,382,810,382,808,382,834,358,810,382,410,780,810,382,1210,8338,9126,4796,382,812,382,808,382,784,408,808,382,786,806,410,782,410,780,412,382,808,782,410,358,832,758,434,758,434,780,412,758,434,758,434,378,788,386,808,384,830,360,830,360,804,388,832,760,432,360,830,762,430,762,432,760,432,760,430,762,430,762,428,388,804,784,408,1186,1,2,38
oscillation_state_topic: NodeMCU6/status
oscillation_command_topic: NodeMCU6/irout/set
payload_oscillation_on: 9152,4774,428,764,386,832,360,808,384,806,386,830,760,432,758,434,758,434,358,808,784,432,362,830,760,432,760,432,758,434,758,432,760,432,380,790,384,830,360,832,362,830,760,432,360,832,360,830,364,828,762,430,762,428,762,432,760,432,362,802,788,432,762,430,762,430,1162,8334,9158,4766,432,786,388,778,390,826,364,804,388,828,762,430,760,430,762,430,364,828,764,428,364,804,786,430,760,432,760,432,762,430,760,432,380,814,386,806,364,828,362,830,762,432,360,830,362,830,362,830,760,432,760,432,758,434,760,432,360,806,784,434,758,434,758,434,1156,8336,9178,4748,406,790,404,810,382,810,382,786,406,808,782,410,780,412,780,412,380,786,804,412,382,784,806,412,780,412,780,412,780,412,780,410,380,814,382,784,408,810,382,808,782,410,382,784,408,808,384,784,806,412,780,410,780,412,782,410,380,810,780,412,782,410,780,410,1180,1,2,38
payload_oscillation_off: 9152,4774,428,764,386,832,360,808,384,806,386,830,760,432,758,434,758,434,358,808,784,432,362,830,760,432,760,432,758,434,758,432,760,432,380,790,384,830,360,832,362,830,760,432,360,832,360,830,364,828,762,430,762,428,762,432,760,432,362,802,788,432,762,430,762,430,1162,8334,9158,4766,432,786,388,778,390,826,364,804,388,828,762,430,760,430,762,430,364,828,764,428,364,804,786,430,760,432,760,432,762,430,760,432,380,814,386,806,364,828,362,830,762,432,360,830,362,830,362,830,760,432,760,432,758,434,760,432,360,806,784,434,758,434,758,434,1156,8336,9178,4748,406,790,404,810,382,810,382,786,406,808,782,410,780,412,780,412,380,786,804,412,382,784,806,412,780,412,780,412,780,412,780,410,380,814,382,784,408,810,382,808,782,410,382,784,408,808,384,784,806,412,780,410,780,412,782,410,380,810,780,412,782,410,780,410,1180,1,2,38
speed_command_topic: NodeMCU6/irout/set
payload_low_speed: 9126,4798,380,784,438,754,412,780,436,754,438,754,810,382,810,382,810,382,436,756,810,382,412,778,812,380,812,380,810,380,812,382,810,382,408,786,412,778,436,758,434,756,410,780,810,382,434,756,412,780,808,386,806,384,832,360,808,384,832,358,410,778,812,384,808,384,1230,8294,9148,4772,406,786,412,778,418,774,412,780,412,780,812,380,812,380,810,382,412,778,812,382,412,780,810,382,810,382,810,382,810,382,810,382,382,810,412,780,412,780,412,780,410,780,812,382,410,780,412,780,810,384,808,382,808,382,810,382,808,384,412,780,810,384,808,382,1208,8316,9152,4776,378,810,412,778,412,778,412,780,412,780,810,382,810,382,810,382,412,780,810,384,410,780,810,382,810,382,810,382,808,384,810,382,384,810,412,780,412,780,412,780,412,780,812,382,412,780,410,780,810,382,808,382,810,382,810,382,810,380,412,782,808,384,808,382,1208,1,2,38
payload_medium_speed: 9126,4798,380,784,438,754,412,780,436,754,438,754,810,382,810,382,810,382,436,756,810,382,412,778,812,380,812,380,810,380,812,382,810,382,408,786,412,778,436,758,434,756,410,780,810,382,434,756,412,780,808,386,806,384,832,360,808,384,832,358,410,778,812,384,808,384,1230,8294,9148,4772,406,786,412,778,418,774,412,780,412,780,812,380,812,380,810,382,412,778,812,382,412,780,810,382,810,382,810,382,810,382,810,382,382,810,412,780,412,780,412,780,410,780,812,382,410,780,412,780,810,384,808,382,808,382,810,382,808,384,412,780,810,384,808,382,1208,8316,9152,4776,378,810,412,778,412,778,412,780,412,780,810,382,810,382,810,382,412,780,810,384,410,780,810,382,810,382,810,382,808,384,810,382,384,810,412,780,412,780,412,780,412,780,812,382,412,780,410,780,810,382,808,382,810,382,810,382,810,380,412,782,808,384,808,382,1208,1,2,38
payload_high_speed: 9126,4798,380,784,438,754,412,780,436,754,438,754,810,382,810,382,810,382,436,756,810,382,412,778,812,380,812,380,810,380,812,382,810,382,408,786,412,778,436,758,434,756,410,780,810,382,434,756,412,780,808,386,806,384,832,360,808,384,832,358,410,778,812,384,808,384,1230,8294,9148,4772,406,786,412,778,418,774,412,780,412,780,812,380,812,380,810,382,412,778,812,382,412,780,810,382,810,382,810,382,810,382,810,382,382,810,412,780,412,780,412,780,410,780,812,382,410,780,412,780,810,384,808,382,808,382,810,382,808,384,412,780,810,384,808,382,1208,8316,9152,4776,378,810,412,778,412,778,412,780,412,780,810,382,810,382,810,382,412,780,810,384,410,780,810,382,810,382,810,382,808,384,810,382,384,810,412,780,412,780,412,780,412,780,812,382,412,780,410,780,810,382,808,382,810,382,810,382,810,380,412,782,808,384,808,382,1208,1,2,38
- platform: smartir
name: 客厅壁扇
device_code: 1044
controller_data: Remote2
smartir:
climate:
- platform: saswell
username: !secret saswell_username
password: !secret saswell_password
- platform: modbus2
name: [餐厅空调, 客厅空调, 主卧空调, 儿童房空调]
fan_mode: { registers: [6, 10, 14, 18] }
fan_modes: { 自动: 0, 一档: 1, 二档: 2, 三档: 3, 四档: 4, 五档: 5 }
hvac_mode: { registers: [5, 9, 13, 17] }
hvac_modes: { 'off': 0, cool: 1, heat: 2, dry: 3, fan_only: 4 }
hvac_off: { registers: [1, 2, 3, 4], register_type: coil }
target_temperature: { registers: [4, 8, 12, 16] }
temperature: { registers: [3, 6, 9, 12], register_type: input, scale: 0.1 }
- platform: smartir
name: 书房空调
device_code: 1120
controller_data: Remote
temperature_sensor: sensor.shu_fang_wen_du
humidity_sensor: sensor.aircat2_humidity
mrbond_airer:
name: 晾衣架
host: Airer
token: !secret airer_token
cover:
- platform: broadlink2
host: Remote
mac: 34:EA:34:58:73:5D
covers:
shu_fang_chuang_lian:
name: 书房窗帘
travel_time: 13
command_open: 'sgD8AJ8wGAwNFxgMGAwYDAwYFwwYDQwYGAsNFw0XDRcYDAwYDBgNFxkMDBgYDBgMDBcNFw0XGQsNFxgMGAwMGAwYDBgXDQwYDBcNFxgMDRcMGAwXGAABIZ4xGQwNFxgMGAwYDAwXGAwYDQwXGAwNFw0XDBgYDAwYDBgMGBgMDBcYDBgMDRcMGAwYGAwMGBgMGAwMFw0XDRcYDA0XDBgMGBgMDBkMFw0XGAABIZ4xFwwNFxgMGAwYDAwYGAwYDAwYGAwMFw0XDRcYDAwYDBgNFxgMDBgYDRgMDBgMFw0YGAsNFxgMGAwMGAwYDBcYDQwYDBcNFxgMDBgMGAwYFwAF3AAAAAAAAAAAAAAAAA=='
command_stop: 'sgD8AJ4xGAwMGBcMGAwYDAwYGAwYDAwYGAwMGAwZDBcYDAwYDBkLGBgMDBgYDBcNDBgMFw0YFw0MFxgMGAwMGAwYDBgXDQwYFw0MFxgMDRcYDAwYFwABIZ8xGAwMGBcNFw0XDQwXGAwYDQwYFwwNFwwYDBgXDQwYDBgMGBcMDRcYDBgMDBgMGAwYGAwMGBcNFwwNFwwYDBgZDAwYFw0MGBcNDBcYDAwYGAABIJ4xGAwMGBgMGAwXDQwXGAwYDQwYFwwNFwwYDBgYDAwYDRgMGBcNDBcYDBgMDBgMGAwYGAwMGBcNFw0MGAsYDBgYDAwYGAwMGBcNDBcYDAwYGAAF3AAAAAAAAAAAAAAAAA=='
command_close: 'sgD8AJ0xGAwMGBcNFw0XDQsYGAwYDAwZFwwMGAwYDBgXDQwXDBkMGBcNCxkXDBgMDBkMGAwYGAwMGBcNFw0MGAsZCxgYDQsYDBgXDRcNDBgMGBcNFwABIZ4xFw0MGBcNFwwYDA0YGAwYDAwYGAwMGAwYDBgXDQsYDBgMGBgMDBgXDRcNDBgMGAwYFw0MGBcMGAwMGAwYDBgXDQwYDBgXDRcMDBgMGBgMFwABI50yFw0LGBgMGAwXDQwYFw0XDQwYFw0MGAwYDBcYDAwYDBgMGBgMDBgXDRcNCxkLGAwYGA4MFxgMGAwMGAwYDBgXDQwYDBgXDBgNCxgMGBcNFwAF3AAAAAAAAAAAAAAAAA=='
tou_ying_mu_bu:
name: 投影幕布
travel_time: 45
command_open: 'JgDGACoPKQ8pDykQDikOKg4qDykPKA4qKQ8PKQ8pKA8QKSgQKQ8pDw8pKBApDykPDykpDykPDykpDw8pKQ8PKQ8pKAAD0igQKBAoECgQDykPKQ8oDykPKQ8pKBAPKQ8oKRAPKCkQKBAoEA8oKBEoECgQDykoECgQDykoEA8pKBAPKA8pKQAD0SkPKRAoECgQDygQKA8pDykPKQ8oKRAPKA4qKQ8PKSkPKQ8pDw8pKQ8pDykQDygpECgQDikqDw8oKQ8PKQ8pKQANBQAA'
command_stop: 'JgDGACoPKg8pDykPDygQKBEnDykQKBAnECgpDw8pKBAPKSgQKg4qDg8pECgqDikPDykQKA8pKBApDykPKQ8PKRAoDwAD6ioOKQ8pECkPDygQKA8pECgPKQ8oDykoEA8pKQ8PKSgQKQ8qDg8pECgoECoODykPKQ8oKRAoECkPKQ8PKQ8oEAAD6ikPKQ8qDikQDikPKQ8pDykPKBAoDykpDw8pKQ8PKSgQKQ8pDw8pDykoECkPDioPKQ8oKRAoECgQKBAPKQ8oEAANBQAA'
command_close: 'JgDGACoPKRAoECgQDykPKBAoDykPKSgQDykPKA8pKQ8PKSkPKQ4qECgQDygpECgQKBAPKSgQKBAPKQ8oKRAPKA8pKQAD0SgQKQ8pDykPECgPKQ8pDykPKCkQDygPKQ8pKBAPKSgQKQ8pDykPDykoECkPKQ8PKSkOKg8PKQ8pKQwSKQ8pKAAD0igQKBAoECkPDykPKQ8oDykPKSkPDykPKQ8oKRAPKCkQKBAoECgQDykoECgQKA8QKSgQKQ8PKQ8pKBAPKBAoKQANBQAA'
media_player:
- platform: braviatv
host: X9300d
name: 主卧电视
- platform: braviatv
host: X9400e
name: 客厅电视
- platform: dlna_dmr
name: 天猫精灵
url: http://Magic:49153/description.xml
panel_iframe:
dash:
title: 面板
icon: mdi:microsoft
url: /local/dash.html
actuator:
genie:
zhibot:
- platform: ding
password: !secret zhibot_password
- platform: miai
password: !secret zhibot_password
zhimsg:
- platform: ding
token: !secret dingbot_token
secret: !secret dingbot_secret
- platform: miai
miid: !secret miai_miid
password: !secret miai_password
# input_text:
# yu_yin_bo_bao:
# name: 语音播报
# icon: mdi:account-tie-voice
# initial: 您好