-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.yaml
478 lines (448 loc) · 16.1 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
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
frontend:
themes: !include_dir_merge_named themes
extra_module_url:
- /local/card-mod.js
homeassistant:
auth_providers:
- type: homeassistant
customize:
# Add an entry for each entity that you want to overwrite.
sensor.soil_sensor_soil_moisture:
device_class: humidity
packages: !include_dir_named packages/
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
mqtt:
sensor:
- state_topic: "homeassistant/camera/yicam/motion_detection"
qos: 1
name: "Motion sensor - yicam"
unique_id: motion_sensor_yicam
- state_topic: "homeassistant/camera/yicam/sound_detection"
qos: 1
name: "Sound sensor - yicam"
unique_id: sound_sensor_yicam
camera:
- platform: ffmpeg
name: PetCam
input: rtsp://172.16.1.23:8554/pet-cam
- platform: yi
name: My Camera
host: "172.16.1.31"
password: !secret petcam_password
ffmpeg_arguments: "-vf scale=800:450"
http:
use_x_forwarded_for: true
trusted_proxies:
- 172.16.1.23
shell_command:
make_video: curl http://172.16.1.23:8822/video.php
mount_ipcam: curl http://172.16.1.23:8822/latestCam.jpg -o /config/www/latestCam.jpg
switch:
- platform: wake_on_lan
name: "PC Wake"
mac: 40:8D:5C:B9:44:2B
- platform: wake_on_lan
name: "VM Wake"
mac: 52:54:00:F8:24:DD
- platform: flux
lights:
- light.color_temp_lights
name: Flux Lights
transition: 5
interval: 60
start_colortemp: 4000
sunset_colortemp: 3000
stop_colortemp: 2500
mode: mired
media_player:
- platform: group
entities:
- media_player.beam
- media_player.kitchen
- media_player.bedroom
- media_player.office
spotcast:
sp_dc: !secret sp_dc
sp_key: !secret sp_key
template:
- sensor:
- name: Sonos group volume level
state: |
{{
((float(state_attr('media_player.beam', "volume_level")) +
float(state_attr('media_player.beam', "volume_level")) +
float(state_attr('media_player.beam', "volume_level")) +
float(state_attr('media_player.beam', "volume_level"))) / 4) * 100 | int
}}
- name: Sonos group bass level
state: |
{{
((float(states('number.beam_bass')) +
float(states('number.kitchen_bass')) +
float(states('number.office_bass')) +
float(states('number.bedroom_bass'))) / 4) | int
}}
- name: Plant low moisture
state: |
Water Plants
{% for plant in expand('group.climate') | map(attribute='entity_id') %}
{%- if states[plant].state | int < 25 -%}
{{ state_attr(plant, "friendly_name") | regex_replace("\s(.*)", " (") + states[plant].state | string + "%)" }}
{%- endif %}
{% endfor %}
- name: Translink {{ state_attr('sensor.translink_sb_1', 'RouteNo') }} SB
unique_id: Translink 59580 SB
state: |
{{
state_attr('sensor.translink_sb_1', 'Schedules')[0].ExpectedCountdown
}}{{
state_attr('sensor.translink_sb_1', 'Schedules')[0].ScheduleStatus
}}min at {{
state_attr('sensor.translink_sb_1', 'Schedules')[0].ExpectedLeaveTime
}}
attributes:
ExpectedCountdown: >
{{ state_attr('sensor.translink_sb_1', 'Schedules')[0].ExpectedCountdown }}
ExpectedLeaveTime: >
{{ state_attr('sensor.translink_sb_1', 'Schedules')[0].ExpectedLeaveTime }}
- name: Translink {{ state_attr('sensor.translink_sb_2', 'RouteNo') }} SB
unique_id: Translink 59580 SB 2
state: |
{{
state_attr('sensor.translink_sb_2', 'Schedules')[0].ExpectedCountdown
}}{{
state_attr('sensor.translink_sb_2', 'Schedules')[0].ScheduleStatus
}}min at {{
state_attr('sensor.translink_sb_2', 'Schedules')[0].ExpectedLeaveTime
}}
attributes:
ExpectedCountdown: >
{{ state_attr('sensor.translink_sb_2', 'Schedules')[0].ExpectedCountdown }}
ExpectedLeaveTime: >
{{ state_attr('sensor.translink_sb_2', 'Schedules')[0].ExpectedLeaveTime }}
- name: Translink {{ state_attr('sensor.translink_sb_3', 'RouteNo') }} SB
unique_id: Translink 59580 SB 3
state: |
{{
state_attr('sensor.translink_sb_3', 'Schedules')[0].ExpectedCountdown
}}{{
state_attr('sensor.translink_sb_3', 'Schedules')[0].ScheduleStatus
}}min at {{
state_attr('sensor.translink_sb_3', 'Schedules')[0].ExpectedLeaveTime
}}
attributes:
ExpectedCountdown: >
{{ state_attr('sensor.translink_sb_3', 'Schedules')[0].ExpectedCountdown }}
ExpectedLeaveTime: >
{{ state_attr('sensor.translink_sb_3', 'Schedules')[0].ExpectedLeaveTime }}
rest:
- resource: https://api.translink.ca/RTTIAPI/V1/stops/59580/estimates?apiKey=XvWpEMxvLQY6TemyoSbE&count=2
headers:
Accept: application/json
Content-Type: application/json
# value_template: 'OK'
scan_interval:
seconds: 30
sensor:
- name: "translink_sb_1"
json_attributes_path: "$[0]"
value_template: "OK"
json_attributes:
- "RouteNo"
- "RouteName"
- "Schedules"
- name: "translink_sb_2"
json_attributes_path: "$[1]"
value_template: "OK"
json_attributes:
- "RouteNo"
- "RouteName"
- "Schedules"
- name: "translink_sb_3"
json_attributes_path: "$[2]"
value_template: "OK"
json_attributes:
- "RouteNo"
- "RouteName"
- "Schedules"
sensor:
- platform: history_stats
name: Tent light on today
entity_id: switch.ikea_power_outlet_2
state: "on"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
- platform: spotcast
country: CA
- platform: rtorrent
url: !secret rtorrent_url
monitored_variables:
- "current_status"
- "download_speed"
- "upload_speed"
- "all_torrents"
- "stopped_torrents"
- "complete_torrents"
- "uploading_torrents"
- "downloading_torrents"
- "active_torrents"
- platform: rest
resource: https://www.theweathernetwork.com/api/data/cabc0308
name: weather_network
json_attributes:
- obs
- swo
value_template: "OK"
scan_interval:
minutes: 160
- platform: waqi
token: !secret waqi_key
locations:
- vancouver
- platform: netdata
host: "172.16.1.23"
port: "19999"
resources:
system_load:
data_group: system.load
element: load15
core_temp:
data_group: sensors.k10temp-pci-00c3_temperature
element: k10temp-pci-00c3_temp1
hdd_temp_sdb:
data_group: hddtemp_local.temperatures
element: sdb
hdd_temp_sdc:
data_group: hddtemp_local.temperatures
element: sdc
hdd_temp_sdd:
data_group: hddtemp_local.temperatures
element: sdd
hdd_temp_cache:
data_group: hddtemp_local.temperatures
element: sde
hdd_temp_sdg:
data_group: hddtemp_local.temperatures
element: sdg
cache_usage:
data_group: btrfs.data_62beaf9d-e911-465f-99f8-109a5eb0d549
element: used
disk1_usage:
data_group: disk_space._mnt_disk1
element: avail
disk2_usage:
data_group: disk_space._mnt_disk2
element: avail
disk3_usage:
data_group: disk_space._mnt_disk3
element: avail
disk4_usage:
data_group: disk_space._mnt_disk4
element: avail
- platform: lastfm
api_key: !secret lastfm_key
users:
- landonroha
- paperbutt
- platform: template
sensors:
air_quality_oven_fan_trigger:
value_template: '{{ states["sensor.particulate_matter_2_5um_concentration"].state | int > states["input_number.oven_fan_start_ppm"].state | int }}'
friendly_name: "Air Quality Oven Fan Trigger"
beam_grouped_kitchen:
value_template: '{{ state_attr("media_player.kitchen", "media_title") == state_attr("media_player.beam", "media_title") and is_state("media_player.beam", "idle") == false }}'
friendly_name: "Beam grouped to kitchen speaker"
beam_grouped_bedroom:
value_template: '{{ state_attr("media_player.bedroom", "media_title") == state_attr("media_player.beam", "media_title") and is_state("media_player.beam", "idle") == false }}'
friendly_name: "Beam grouped to bedroom speaker"
current_time:
value_template: '{{ now().timestamp() | timestamp_custom("%-I:%M %p, %a %b %d") }}'
friendly_name: "Current Time"
weather_network_pollen_index:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["pollen_index"] }}'
friendly_name: "Pollen Index"
weather_network_pollen_name:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["pollen_name"] }}'
friendly_name: "Pollen Risk Type"
weather_network_uv_index:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["uv_label"] }}'
friendly_name: "UV Index"
weather_network_air_quality:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["aq_level"] }}'
friendly_name: "Air Quality"
weather_network_temperature:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["t"] }}'
friendly_name: "Temperature (Weather Network)"
device_class: temperature
unit_of_measurement: "°C"
weather_network_swo_level:
value_template: '{{ states.sensor.weather_network.attributes["swo"]["swo_level"] }}'
friendly_name: "Severe Weather Risk Level"
weather_network_swo_type:
value_template: '{{ states.sensor.weather_network.attributes["swo"]["swo_type"] }}'
friendly_name: "Severe Weather Risk Type"
desk_light_hue_saturation:
value_template: >
({{ ((states.number.desk_height_cm.state | int - 59) / (115 - 59) * (360)) }}, 100)
desk_light_temperature:
value_template: >
{{ ((states.number.desk_height_cm.state | int - 59) / (115 - 59) * (6500 - 2000) + 2000) }}
clean_litter_time_template:
value_template: >
{{ ((as_timestamp(now()) - as_timestamp(state_attr('automation.litter_cleaned', 'last_triggered'))) / 3600) | round(1) }}hr ({{ ((as_timestamp(now()) - as_timestamp(state_attr('automation.litter_cleaned', 'last_triggered'))) / 3600 / 24) | round(1) }}d)
clean_litter_template:
value_template: >
{% if ((as_timestamp(now()) - as_timestamp(state_attr('automation.litter_cleaned', 'last_triggered'))) / 64800) > 1 -%}
true
{%- else -%}
false
{%- endif %}
washing_machine_state:
value_template: >
{% if states['input_select.washing_machine_state_machine'].state == 'idle' -%}
{% if states['binary_sensor.contact_sensor_contact'].state == 'off' -%}
OffClosed
{%- else -%}
OffOpen
{%- endif %}
{% else -%}
Running
{%- endif %}
dishwasher_running_template:
value_template: >
{% if states['input_boolean.dishwasher_running'].state == 'off' -%}
{% if ((as_timestamp(now()) - as_timestamp(state_attr('automation.notify_dishwasher_finished', 'last_triggered'))) / 86400) > 1 -%}
Off {{ ((as_timestamp(now()) - as_timestamp(state_attr('automation.notify_dishwasher_finished', 'last_triggered'))) / 86400) | round(1) }}d
{%- else -%}
Off {{ ((as_timestamp(now()) - as_timestamp(state_attr('automation.notify_dishwasher_finished', 'last_triggered'))) / 3600) | round(1) }}hr
{%- endif %}
{%- else -%}
On {{ ((as_timestamp(now()) - as_timestamp(state_attr('automation.notify_dishwasher_finished', 'last_triggered'))) / 60) | round(0) }}m
{%- endif %}
washing_machine_running_template:
value_template: >
{% if states['input_boolean.washing_machine_running'].state == 'off' -%}
{% if ((as_timestamp(now()) - as_timestamp(state_attr('automation.notify_washing_machine_finished', 'last_triggered'))) / 86400) > 1 -%}
Off {{ ((as_timestamp(now()) - as_timestamp(state_attr('automation.notify_washing_machine_finished', 'last_triggered'))) / 86400) | round(1) }}d
{%- else -%}
Off {{ ((as_timestamp(now()) - as_timestamp(state_attr('automation.notify_washing_machine_finished', 'last_triggered'))) / 3600) | round(1) }}hr
{%- endif %}
{%- else -%}
On {{ ((as_timestamp(now()) - as_timestamp(state_attr('automation.notify_washing_machine_finished', 'last_triggered'))) / 60) | round(0) }}m
{%- endif %}
tautulli_wan_bandwidth:
friendly_name: "Wan Bandwidth"
value_template: "{{ (state_attr('sensor.tautulli', 'wan_bandwidth') / 1024) | round(2) }}"
unit_of_measurement: "Mbps"
tautulli_lan_bandwidth:
friendly_name: "Lan Bandwidth"
value_template: "{{ (state_attr('sensor.tautulli', 'lan_bandwidth') / 1024) | round(2) }}"
unit_of_measurement: "Mbps"
tautulli_total_bandwidth:
friendly_name: "Total Bandwidth"
value_template: "{{ (state_attr('sensor.tautulli', 'total_bandwidth') / 1024) | round(2) }}"
unit_of_measurement: "Mbps"
light:
- platform: switch
name: Bathroom Lights
entity_id: switch.bathroom_switch
- platform: switch
name: Kitchen Track Lights
entity_id: switch.kitchen_track_switch
- platform: switch
name: Kitchen Counter Lights
entity_id: switch.kitchen_counter_switch
- platform: group
name: All Lights
entities:
- light.bathroom_light_switch
- light.bedroom_light
- light.office_lamp
- light.kitchen_track_lights
- light.kitchen_light_1
- light.kitchen_light_2
- light.kitchen_counter_lights
- light.living_room_lamp_big
- light.living_room_lamp_small
- light.living_room_shelf_light
- light.nightstand_lamp
- light.living_room_lamp_back
- platform: group
name: All Brightness Lights
entities:
- light.bedroom_light
- light.office_lamp
- light.kitchen_light_1
- light.kitchen_light_2
- light.living_room_lamp_big
- light.living_room_lamp_small
- light.nightstand_lamp
- light.living_room_lamp_back
- platform: group
name: All Switch Lights
entities:
- light.bathroom_light_switch
- light.kitchen_track_lights
- light.kitchen_counter_lights
- light.living_room_shelf_light
- platform: group
name: Kitchen Lights
entities:
- light.kitchen_track_lights
- light.kitchen_light_1
- light.kitchen_light_2
- light.kitchen_counter_lights
- platform: group
name: Bedroom Lights
entities:
- light.bedroom_light
- light.nightstand_lamp
- platform: group
name: Living Room Lights
entities:
- light.living_room_lamp_big
- light.living_room_lamp_small
- light.living_room_shelf_light
- light.living_room_lamp_back
#Create Menu
input_select:
lr_scene: #Custom Variable
options:
- dim
- colors
- offScene
- warm
- bright
- hell
initial: offScene
lr_scene_transition:
options:
- "True"
- "False"
generic_hygrostat:
- name: Tent Hygrostat
humidifier: switch.fountain_switch
target_sensor: sensor.ttgo_tent_ble_humidity
min_humidity: 30
max_humidity: 65
target_humidity: 50
dry_tolerance: 3
wet_tolerance: 0
device_class: "humidifier"
min_cycle_duration:
seconds: 5
keep_alive:
minutes: 3
initial_state: true
away_humidity: 35
away_fixed: True
sensor_stale_duration: 00:15:00