-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathconfiguration.yaml
executable file
·668 lines (632 loc) · 18.7 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 of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: !secret latitude
longitude: !secret longitude
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: !secret elevation
unit_system: metric
currency: DKK
country: DK
temperature_unit: C
time_zone: "Europe/Copenhagen"
external_url: !secret external_url
internal_url: !secret internal_url
customize: !include customize.yaml
packages: !include_dir_named packages
default_config:
config:
api:
system_health:
frontend:
themes: !include_dir_merge_named themes
person:
http:
# Uncomment this to add a password (recommended!)
# api_password: !secret password
ssl_certificate: !secret ssl_certificate
ssl_key: !secret ssl_key
# Uncomment this if you are using SSL or running in Docker etc
# base_url: example.duckdns.org:8123
# depricated
# base_url: !secret base_url
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
- 192.168.8.0/24
- 172.30.0.0/16
- 10.0.0.0/8
cors_allowed_origins:
- https://google.com
- https://home-assistant.io
- https://www.home-assistant.io
# trusted_networks:
# - 127.0.0.1
# - ::1
#ip_ban_enabled: True
#login_attempts_threshold: 5
# The recorder component is storing details in a database which then are handled by the history component.
recorder:
db_url: !secret db_url
exclude:
domains:
- weblink
- homekit
- uptime
- updater
- light
- scene
- update
entity_globs:
- binary_sensor.hmnmbp*
- sensor.hmnmbp*
- sensor.clock*
- sensor.date*
- sensor.glances*
- sensor.load_*m
- sensor.time*
- sensor.uptime*
- input_boolean.*_motion
- binary_sensor.*_motion_sensor_*
- automation.motion*
- automation.*light_timer*
- 2dc21c2c_13160d33_*
- number.everything_presence_lite_209d88*
- sensor.everything_presence_lite_209d88*
- binary_sensor.everything_presence_lite_209d88*
entities:
- sensor.date
- sensor.time
- sensor.time_utc
- sensor.time_date
- sensor.date_time
- sensor.date_time_iso
- sensor.date_time_utc
- sensor.internet_time
- sensor.henriks_iphone_battery_state
- sensor.henriks_ipad_battery_state
- sensor.henriks_iphone_bssid
- device_tracker.udr
- device_tracker.shelly_h_t
#event_types:
# -
# View all events in a logbook
logbook:
exclude:
domains:
- weblink
- light
- homekit
- timer
- uptime
- updater
- scene
- update
entity_globs:
- binary_sensor.hmnmbp*
- sensor.hmnmbp*
- sensor.clock*
- sensor.date*
- sensor.glances*
- sensor.load_*m
- sensor.time*
- sensor.uptime*
- input_boolean.*_motion
- binary_sensor.*_motion_sensor_*
- automation.motion*
- automation.*light_timer*
- sensor.lenovo_*
- binary_sensor.lenovo_*
- number.everything_presence_lite_209d88*
- sensor.everything_presence_lite_209d88*
- binary_sensor.everything_presence_lite_209d88*
- sensor.nzbget_*
- binary_sensor.alladin_drive_*
entities:
- sensor.date
- sensor.time
- sensor.time_utc
- sensor.time_date
- sensor.date_time
- sensor.date_time_iso
- sensor.date_time_utc
- sensor.internet_time
- sensor.henriks_iphone_battery_state
- sensor.henriks_ipad_battery_state
- sensor.henriks_iphone_bssid
- media_player.hmnmbp
- binary_sensor.lenovo
cloud:
zeroconf:
ssdp:
ios:
#alexa:
mobile_app:
energy:
sun:
wake_on_lan:
zha:
custom_quirks_path: /config/custom_zha_quirks/
zigpy_config:
ota:
otau_directory: /config/zigpy_ota
extra_providers:
- type: salus
- type: ikea # Disabled by default, some updates change device functionality. A recent one bricked bulbs.
- type: z2m # Disabled by default, community contributed. Points to the GitHub repository by default.
influxdb:
host: a0d7b954-influxdb
port: 8086
database: homeassistant
username: !secret influxdb_username
password: !secret influxdb_password
max_retries: 3
default_measurement: state
# weather:
# - platform: template
# name: "Netatmo"
# condition_template: "{{ states('weather.pirateweather') }}"
# temperature_template: "{{ states('sensor.kitchen_outdoor_temperatur') | float }}"
# temperature_unit: "°C"
# humidity_template: "{{ states('sensor.kitchen_outdoor_luftfugtighed') | float }}"
# #forecast_template: "{{ state_attr('weather.my_region', 'forecast') }}"
#aws:
# credentials:
# - name: hass
# aws_access_key_id: !secret aws_access_key_id
# aws_secret_access_key: !secret aws_secret_access_key
# notify:
# - service: sns
# name: awssns
# region_name: !secret aws_region_name
python_script:
switch:
- platform: template
switches:
servers:
friendly_name: Servers
value_template: "{{ is_state('switch.synology_power_state', 'on') or is_state('switch.genie_power_state', 'on') }}"
turn_on:
service: script.servers_on
turn_off:
service: script.servers_off
genie_power_state:
friendly_name: genie power state
value_template: "{{ is_state('binary_sensor.genie_ping', 'on') }}"
turn_on:
service: shell_command.genie_poweron
data:
username: !secret genie_idrac_username
password: !secret genie_idrac_password
turn_off:
service: shell_command.genie_poweroff
data:
username: !secret genie_idrac_username
password: !secret genie_idrac_password
- platform: wake_on_lan
name: LG OLED power state
host: !secret lg_oled_wired_ip
mac: !secret lg_oled_wired_mac
turn_off:
service: media_player.turn_off
data:
entity_id: media_player.lg_oled
- platform: wake_on_lan
name: Synology power state
host: 192.168.8.10
mac: 00:11:32:c6:cd:7b
# turn_off:
# service: button.press
# data:
# entity_id: button.alladin_shutdown
turn_off:
service: shell_command.alladin_shutdown
# - platform: wake_on_lan
# name: genie power state
# host: 192.168.8.2
# mac: 6c:2b:59:95:82:94
# turn_off:
# service: shell_command.genie_shutdown
shell_command:
# smappee_reboot: bash /config/shell_scripts/smappee_reboot.sh
genie_shutdown: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/ssh/id_rsa hmn@192.168.8.2 'sudo shutdown -h now homeassistant-shutdown'"
genie_poweroff: python3 custom_scripts/GetSetPowerStateREDFISH.py -ip 192.168.8.3 -u {{ username }} -p {{ password }} --set GracefulShutdown
genie_poweron: python3 custom_scripts/GetSetPowerStateREDFISH.py -ip 192.168.8.3 -u {{ username }} -p {{ password }} --set On
alladin_shutdown: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/ssh/id_rsa hmn@192.168.8.10 'sudo shutdown -h now homeassistant-shutdown'"
alladin_reboot: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/ssh/id_rsa hmn@192.168.8.10 'sudo reboot'"
alladin_btrfs_scrub_start: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/ssh/id_rsa hmn@192.168.8.10 'sudo btrfs scrub start /volume1'"
alladin_btrfs_scrub_resume: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/ssh/id_rsa hmn@192.168.8.10 'sudo btrfs scrub resume /volume1'"
alladin_btrfs_scrub_cancel: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/ssh/id_rsa hmn@192.168.8.10 'sudo btrfs scrub cancel /volume1'"
alladin_btrfs_scrub_status: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/ssh/id_rsa hmn@192.168.8.10 'sudo btrfs scrub status /volume1'"
command_line:
- binary_sensor:
name: "synology btrfs scrub status"
command: "ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/ssh/id_rsa hmn@192.168.8.10 'sudo btrfs scrub status /volume1' | grep -q running && (echo 'running') || (echo 'not running')"
device_class: running
payload_on: "running"
payload_off: "not running"
scan_interval: 900
unique_id: synology_btrfs_scrub_status
- binary_sensor:
name: "kometa sensor"
command: "ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/ssh/id_rsa hmn@192.168.8.2 'ps aux' | grep -q '[k]ometa' && (echo 'running') || (echo 'not running')"
device_class: running
payload_on: "running"
payload_off: "not running"
scan_interval: 900
unique_id: kometa_status
sensor:
- platform: statistics
name: "Bathroom aqara humidity over last 24 hours"
entity_id: sensor.bathroom_temperature_sensor_humidity
state_characteristic: average_linear
max_age:
hours: 24
sampling_size: 50
precision: 1
# energy
# power conversion
# https://www.home-assistant.io/integrations/integration/#energy
- platform: integration
source: sensor.total_power
name: Energy spent
unit_prefix: k
round: 2
method: left
- platform: integration
source: sensor.henrik_nicolaisen_charge_power
name: Car charger spent
unit_prefix: k
round: 2
method: left
input_boolean:
power_stay_on:
name: Power stay on
icon: mdi:power-standby
tv_stay_on:
name: TV stay on
icon: mdi:television
office_stay_on:
name: Office stay on
icon: mdi:power-standby
force_home_mode:
name: Force Home mode on
icon: mdi:home-alert
sleep:
name: Sleep
icon: mdi:sleep
home:
name: Home
icon: mdi:home
input_select:
fan_mode:
name: Fan mode
icon: mdi:dip-switch
options:
- 'default'
- 'eco'
- 'humid'
- 'bathroom'
- 'sleep'
- 'sleep warm'
- 'sleep cold'
- 'off'
climate_mode:
name: Climate mode
icon: mdi:dip-switch
options:
- 'cool'
- 'heat'
- 'off'
server_mode:
name: Server mode
icon: mdi:dip-switch
options:
- 'auto'
- 'on'
- 'off'
- 'working'
# debug
# https://github.com/Ingramz/ecl110
# https://github.com/pymodbus-dev/pymodbus/blob/dev/pymodbus/repl/client/README.md
# pymodbus.console tcp --host 192.168.8.189 --port 502 --framer tcp
#
# client.read_holding_registers count=1 address=11203 slave=5
modbus:
- name: kmtronic
type: tcp
host: 192.168.8.189
port: 502
binary_sensors:
- name: "Danfoss ECL Comfort 110 Pump"
#device_class: heat
scan_interval: 30
input_type: holding
address: 4001
slave: 5
- name: "Danfoss ECL Comfort 110 Valve opening"
#device_class: heat
scan_interval: 30
input_type: holding
address: 4100
slave: 5
- name: "Danfoss ECL Comfort 110 Valve closing"
#device_class: heat
scan_interval: 30
input_type: holding
address: 4101
slave: 5
sensors:
- name: "Danfoss ECL Comfort 110 Outside temperature (S1)"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
scan_interval: 30
input_type: holding
address: 11200
# count: 1
slave: 5
scale: 0.1
precision: 1
data_type: int16
- name: "Danfoss ECL Comfort 110 Flow temperature (S3)"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
scan_interval: 30
input_type: holding
address: 11202
# count: 1
slave: 5
scale: 0.1
precision: 1
data_type: int16
- name: "Danfoss ECL Comfort 110 Return temperature (S4)"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
scan_interval: 30
input_type: holding
address: 11203
# count: 1
slave: 5
scale: 0.1
precision: 1
data_type: int16
- name: "Danfoss ECL Comfort 110 Accumulated outside temperature"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
scan_interval: 30
input_type: holding
address: 11099
# count: 1
slave: 5
scale: 0.1
precision: 1
data_type: int16
- name: "Danfoss ECL Comfort 110 Desired room temperature (S2)"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
scan_interval: 30
input_type: holding
address: 11228
# count: 1
slave: 5
scale: 0.1
precision: 1
data_type: int16
- name: "Danfoss ECL Comfort 110 Desired flow temperature (S3)"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
scan_interval: 30
input_type: holding
address: 11229
## count: 1
slave: 5
scale: 0.1
precision: 1
data_type: int16
# - name: "Danfoss ECL Comfort 110 Desired return temperature (S4)"
# unit_of_measurement: °C
# device_class: temperature
# state_class: measurement
# scan_interval: 30
# input_type: holding
# address: 11230
# # count: 1
# slave: 5
# scale: 0.1
# precision: 1
# data_type: int16
- name: "Danfoss ECL Comfort 110 Mode"
scan_interval: 30
input_type: holding
address: 4200
# count: 1
slave: 5
data_type: int16
climates:
- name: "Danfoss ECL Comfort 110"
scan_interval: 30
address: 11179
# count: 1
slave: 5
data_type: int16
max_temp: 25
min_temp: 2
target_temp_register: 11179
temp_step: 1
hvac_mode_register:
address: 4200
values:
state_auto: 1
#state_cool: 1
state_heat: 2
state_fan_only: 4
state_dry: 3
state_off: 0
switches:
- name: "Danfoss ECL Comfort 110 Pump switch"
scan_interval: 30
address: 4001
slave: 5
command_on: 1
command_off: 0
verify:
delay: 1
state_on: 1
state_off: 0
# switches:
# - name: "Danfoss ECL Comfort 110 Mode Manual"
# scan_interval: 30
# address: 4200
# slave: 5
# command_on: 0
# command_off: 1
# verify:
# delay: 1
# state_on: 0
# state_off: 1
# - name: "Danfoss ECL Comfort 110 Mode Auto"
# scan_interval: 30
# address: 4200
# slave: 5
# command_on: 1
# command_off: 4
# verify:
# delay: 1
# state_on: 1
# state_off: 4
# - name: "Danfoss ECL Comfort 110 Mode Comfort"
# scan_interval: 30
# address: 4200
# slave: 5
# command_on: 2
# command_off: 1
# verify:
# delay: 1
# state_on: 2
# state_off: 1
# - name: "Danfoss ECL Comfort 110 Mode Setback"
# scan_interval: 30
# address: 4200
# slave: 5
# command_on: 3
# command_off: 1
# verify:
# delay: 1
# state_on: 3
# state_off: 1
# - name: "Danfoss ECL Comfort 110 Mode Standby"
# scan_interval: 30
# address: 4200
# slave: 5
# command_on: 4
# command_off: 1
# verify:
# delay: 1
# state_on: 4
# state_off: 1
notify:
# - platform: syslog
# name: syslog
- platform: smtp
name: email
server: email-smtp.eu-west-1.amazonaws.com
port: 587
username: !secret smtp_username
password: !secret smtp_password
starttls: true
sender: !secret notify_email_sender
recipient: !secret notify_email_recipient
#- platform: html5
# name: HTML5
# vapid_pub_key: !secret vapid_pub_key
# vapid_prv_key: !secret vapid_prv_key
# vapid_email: !secret vapid_email
- platform: group
name: ALL_DEVICES
services:
- service: mobile_app_henriks_iphone
#- service: mobile_app_henriks_ipad
- service: mobile_app_hmnmbp
- platform: group
name: all
services:
#- service: syslog
- service: email
#- service: html5
#- service: lg_oled
zone: !include zones.yaml
scene: !include scenes.yaml
script: !include scripts.yaml
automation: !include automations.yaml
logger:
#default: debug
default: info
#default: warning
logs:
# homeassistant.core: debug
#nordpool: debug
#custom_components.nordpool: debug
#custom_components.nordpool.sensor: debug
#custom_components.nordpool.aio_price: debug
custom_components.siku: info
zigpy.ota: debug
#ayncio: debug
# log level for the `aiohttp` Python package
#aiohttp: debug
#urllib3: debug
# http debug
#homeassistant.components.http: debug
#custom_components.media_player.ps4: debug
#homeassistant.components.smappee: error
#homeassistant.components.mqtt: error
#homeassistant.components.mqtt: debug
#homeassistant.deconz: debug
#homeassistant.components.deconz: debug
#pydeconz: debug
#py.warnings: error
#pyps4: debug
#smappy: debug
#pyps4.connection: debug
#pylgtv.webos_client: critical
#aiounifi: debug
#homeassistant.components.unifi: debug
#homeassistant.components.switch.unifi: debug
#homeassistant.components.shell_command: debug
#pyatv: debug
#homeassistant.components.apple_tv: debug
# eloverblik: debug
# pyeloverblik.eloverblik: debug
# custom_components.eloverblik: debug
# nordpool: debug
# custom_components.nordpool: debug
# custom_components.nordpool.sensor: debug
# custom_components.nordpool.aio_price: debug
# custom_components: debug
# log level for HA core
# log level for MQTT integration
#homeassistant.components.mqtt: warning
# log level for all python scripts
#homeassistant.components.python_script: info
# log level for a custom component
# custom_components.my_integration: debug
# log level for the `aiohttp` Python package
#aiohttp: error
# log level for both 'glances_api' and 'glances' integration
#homeassistant.components.glances: fatal
#glances_api: fatal
#homeassistant.components.switch: debug
#homeassistant.components.command_line: debug
#nordpool: debug
#custom_components.nordpool: debug
#custom_components.nordpool.sensor: debug
#custom_components.nordpool.aio_price: debug
#custom_components.zaptec: debug
#homeassistant.components.modbus: debug
#pymodbus: debug