forked from dshokouhi/Home-AssistantConfig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsensorsold.yaml
609 lines (544 loc) · 18.9 KB
/
sensorsold.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
# - platform: crimereports
# name: Crime Reports
# radius: 1000
- platform: ring
monitored_conditions:
- 'battery'
- platform: ups
username: !secret upsuser
password: !secret upspass
- platform: fedex
username: !secret fedexuser
password: !secret fedexpass
# - platform: fitbit
# clock_format: 12H
# monitored_resources:
# - "sleep/startTime"
- platform: moon
- platform: yr
- platform: season
- platform: template
sensors:
washer_running:
value_template: "{{ states('sensor.washer_power_2') | int > 5 }}"
- platform: template
sensors:
dryer_running:
value_template: "{{ states('sensor.dryer_power_2') | int > 5}}"
- platform: template
sensors:
dishwasher_running:
value_template: "{{ states('sensor.dishwasher') | int > 5}}"
# - platform: template
# sensors:
# den_motion_battery:
# value_template: "{{ states.zwave.den_motion_sensor.attributes.battery_level }}"
# unit_of_measurement: '%'
- platform: template
sensors:
front_door_lock_battery:
friendly_name: "Front Door Lock"
value_template: "{{ state_attr('zwave.front_door_lock', 'battery_level') }}"
unit_of_measurement: '%'
device_class: battery
- platform: template
sensors:
den_smoke_battery:
friendly_name: "Den Smoke Sensor"
value_template: "{{ state_attr('zwave.den_smoke', 'battery_level') }}"
unit_of_measurement: '%'
device_class: battery
- platform: pi_hole
host: 192.168.1.47
monitored_conditions:
- ads_blocked_today
- dns_queries_today
- ads_percentage_today
- domains_being_blocked
- platform: radarr
api_key: !secret radarr
host: !secret househost
urlbase: /radarr
ssl: true
port: 443
monitored_conditions:
- upcoming
- platform: sonarr
api_key: !secret sonarr
host: !secret househost
urlbase: /sonarr
ssl: true
port: 443
monitored_conditions:
- upcoming
- platform: wunderground
api_key: !secret wunderground
monitored_conditions:
- alerts
- feelslike_f
- heat_index_f
- relative_humidity
- station_id
- temperature_string
- temp_f
- UV
- weather
- wind_gust_mph
- wind_mph
- wind_string
- weather_1d
- weather_1n
- weather_2d
- weather_2n
- weather_3d
- weather_3n
- platform: template
sensors:
danny_next_event:
friendly_name: Dannys Next Event
value_template: >-
{{ strptime(states.calendar.dshokouhi.attributes.start_time, "%Y-%m-%d %H:%M:%S").strftime("%A %B %d at %H:%M") }}:
{{ states.calendar.dshokouhi.attributes.message }}
{%- if states.calendar.dshokouhi.attributes.location %} at {{ states.calendar.dshokouhi.attributes.location -}}
{% endif %}
icon_template: >-
{% if is_state('calendar.dshokouhi', 'on') %}
mdi:message-alert
{% else %}
mdi:message
{% endif %}
- platform: template
sensors:
danny_next_meeting:
friendly_name: Dannys Next Meeting
value_template: >-
{{ strptime(states.calendar.danny_work.attributes.start_time, "%Y-%m-%d %H:%M:%S").strftime("%A %B %d at %H:%M") }}:
{{ states.calendar.danny_work.attributes.message }}
{%- if states.calendar.danny_work.attributes.location %} at {{ states.calendar.danny_work.attributes.location -}}
{% endif %}
icon_template: >-
{% if is_state('calendar.danny_work', 'on') %}
mdi:message-alert
{% else %}
mdi:message
{% endif %}
- platform: template
sensors:
tosh_next_event:
friendly_name: Toshs Next Event
value_template: >-
{{ strptime(states.calendar.shorteh7.attributes.start_time, "%Y-%m-%d %H:%M:%S").strftime("%A %B %d at %H:%M") }}:
{{ states.calendar.shorteh7.attributes.message }}
{%- if states.calendar.shorteh7.attributes.location %} at {{ states.calendar.shorteh7.attributes.location -}}
{% endif %}
icon_template: >-
{% if is_state('calendar.shorteh7', 'on') %}
mdi:message-alert
{% else %}
mdi:message
{% endif %}
- platform: template
sensors:
next_us_holiday:
friendly_name: Next US Holiday
value_template: >-
{{ strptime(states.calendar.holidays_in_united_states.attributes.start_time, "%Y-%m-%d %H:%M:%S").strftime("%A, %B %d") }}:
{{ states.calendar.holidays_in_united_states.attributes.message }}
icon_template: >-
{% if is_state('calendar.holidays_in_united_states', 'on') %}
mdi:briefcase-check
{% else %}
mdi:domain
{% endif %}
- platform: template
sensors:
next_jewish_holiday:
friendly_name: Next Jewish Holiday
value_template: >-
{{ strptime(states.calendar.jewish_holidays.attributes.start_time, "%Y-%m-%d %H:%M:%S").strftime("%A, %B %d") }}:
{{ states.calendar.jewish_holidays.attributes.message }}
icon_template: >-
{% if is_state('calendar.jewish_holidays', 'on') %}
mdi:briefcase-check
{% else %}
mdi:domain
{% endif %}
- platform: template
sensors:
den_smoke_status:
value_template: '{%- if is_state("sensor.den_smoke_alarm_type", "0") %}
Idle
{%else%}
{%- if is_state("sensor.den_smoke_alarm_type", "1") %}
Fire
{%- elif is_state("sensor.den_smoke_alarm_type", "2") %}
CO2
{%- elif is_state("sensor.den_smoke_alarm_type", "12") %}
Testing
{%- elif is_state("sensor.den_smoke_alarm_type", "13") %}
Idle
{% else %}
Unknown
{%- endif %}
{%endif%}'
friendly_name: 'Den Smoke'
- platform: template
sensors:
bedroom_smoke_status:
value_template: '{%- if is_state("sensor.bedroom_smoke_alarm_type", "0") %}
Idle
{%else%}
{%- if is_state("sensor.bedroom_smoke_alarm_type", "1") %}
Fire
{%- elif is_state("sensor.bedroom_smoke_alarm_type", "2") %}
CO2
{%- elif is_state("sensor.bedroom_smoke_alarm_type", "12") %}
Testing
{%- elif is_state("sensor.bedroom_smoke_alarm_type", "13") %}
Idle
{% else %}
Unknown
{%- endif %}
{%endif%}'
friendly_name: 'Bedroom Smoke'
- platform: template
sensors:
office_smoke_status:
value_template: '{%- if is_state("sensor.office_smoke_alarm_type", "0") %}
Idle
{%else%}
{%- if is_state("sensor.office_smoke_alarm_type", "1") %}
Fire
{%- elif is_state("sensor.office_smoke_alarm_type", "2") %}
CO2
{%- elif is_state("sensor.office_smoke_alarm_type", "12") %}
Testing
{%- elif is_state("sensor.office_smoke_alarm_type", "13") %}
Idle
{% else %}
Unknown
{%- endif %}
{%endif%}'
friendly_name: 'Office Smoke'
- platform: template
sensors:
den_air_purifier_temp:
value_template: "{{ ((states.fan.den_air_purifier.attributes.temperature * 9)/5 + 32)|round }}"
friendly_name: Den Air Purifier Temperature
unit_of_measurement: "F"
device_class: temperature
- platform: template
sensors:
den_air_purifier_humidity:
value_template: "{{ states.fan.den_air_purifier.attributes.humidity }}"
friendly_name: Den Air Purifier Humidity
unit_of_measurement: "%"
device_class: humidity
- platform: template
sensors:
den_air_purifier_aqi:
value_template: "{{ states.fan.den_air_purifier.attributes.aqi }}"
friendly_name: Den Air Purifier AQI
unit_of_measurement: AQI
- platform: template
sensors:
bedroom_air_purifier_temp:
value_template: "{{ ((states.fan.bedroom_air_purifier.attributes.temperature * 9)/5 + 32)|round}}"
friendly_name: Bedroom Air Purifier Temperature
unit_of_measurement: "F"
device_class: temperature
- platform: template
sensors:
bedroom_air_purifier_humidity:
value_template: "{{ states.fan.bedroom_air_purifier.attributes.humidity }}"
friendly_name: Bedroom Air Purifier Humidity
unit_of_measurement: "%"
device_class: humidity
- platform: template
sensors:
bedroom_air_purifier_aqi:
value_template: "{{ states.fan.bedroom_air_purifier.attributes.aqi }}"
friendly_name: Bedroom Air Purifier AQI
unit_of_measurement: AQI
- platform: template
sensors:
living_room_air_purifier_temp:
value_template: "{{ ((states.fan.living_room_air_purifier.attributes.temperature * 9)/5 + 32)|round }}"
friendly_name: Living Room Air Purifier Temperature
unit_of_measurement: "F"
device_class: temperature
- platform: template
sensors:
living_room_air_purifier_humidity:
value_template: "{{ states.fan.living_room_air_purifier.attributes.humidity }}"
friendly_name: Living Room Air Purifier Humidity
unit_of_measurement: "%"
device_class: humidity
- platform: template
sensors:
living_room_air_purifier_aqi:
value_template: "{{ states.fan.living_room_air_purifier.attributes.aqi }}"
friendly_name: Living Room Air Purifier AQI
unit_of_measurement: AQI
- platform: template
sensors:
office_air_purifier_temp:
value_template: "{{ ((states.fan.office_air_purifier.attributes.temperature * 9)/5 + 32)|round }}"
friendly_name: Office Air Purifier Temperature
unit_of_measurement: "F"
device_class: temperature
- platform: template
sensors:
office_air_purifier_humidity:
value_template: "{{ states.fan.office_air_purifier.attributes.humidity }}"
friendly_name: Office Air Purifier Humidity
unit_of_measurement: "%"
device_class: humidity
- platform: template
sensors:
office_air_purifier_aqi:
value_template: "{{ states.fan.office_air_purifier.attributes.aqi }}"
friendly_name: Office Air Purifier AQI
unit_of_measurement: AQI
- platform: command_line
name: Epson Ink Level Black
command: /usr/bin/curl -X GET http://192.168.1.57/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_K.PNG/ && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100; exit }'
unit_of_measurement: '%'
scan_interval: 14400
- platform: command_line
name: Epson Ink Level Magenta
command: /usr/bin/curl -X GET http://192.168.1.57/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_M.PNG/ && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100 }'
unit_of_measurement: '%'
scan_interval: 14400
- platform: command_line
name: Epson Ink Level Yellow
command: /usr/bin/curl -X GET http://192.168.1.57/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_Y.PNG/ && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100 }'
unit_of_measurement: '%'
scan_interval: 14400
- platform: command_line
name: Epson Ink Level Cyan
command: /usr/bin/curl -X GET http://192.168.1.57/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_C.PNG/ && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100 }'
unit_of_measurement: '%'
scan_interval: 14400
- platform: command_line
name: Epson Ink Level Photo Black
command: /usr/bin/curl -X GET http://192.168.1.57/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_K.PNG/ {i++}i==2 && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100; exit }'
unit_of_measurement: '%'
scan_interval: 14400
- platform: template
sensors:
front_door_action:
friendly_name: 'Front Door Action'
value_template: >
{% if is_state('sensor.front_door_lock_alarm_type', '22') %}
Manual Unlock
{% elif is_state('sensor.front_door_lock_alarm_type', '21') %}
Manual Lock
{% elif is_state('sensor.front_door_lock_alarm_type', '19') %}
Keypad Unlock
{% elif is_state('sensor.front_door_lock_alarm_type', '18') %}
Keypad Lock
{% elif is_state('sensor.front_door_lock_alarm_type', '25') %}
Wireless Unlock
{% elif is_state('sensor.front_door_lock_alarm_type', '24') %}
Wireless Lock
{% elif is_state('sensor.front_door_lock_alarm_type', '9') %}
Lock Jammed
{% elif is_state('sensor.front_door_lock_alarm_type', '161') %}
Tamper Alarm
{% else %}
Other
{% endif %}
- platform: template
sensors:
front_door_code:
friendly_name: 'Front Door Code'
value_template: >
{% if is_state('sensor.front_door_lock_alarm_type', '19') or is_state('sensor.front_door_lock_alarm_type', '18') %}
{% if is_state('sensor.front_door_lock_alarm_level', '1') %}
Us
{% elif is_state('sensor.front_door_lock_alarm_level', '2') %}
Dad
{% elif is_state('sensor.front_door_lock_alarm_level', '3') %}
Zoo Keeper
{% elif is_state('sensor.front_door_lock_alarm_level', '4') %}
Courtney
{% elif is_state('sensor.front_door_lock_alarm_level', '5') %}
Izzy
{% else %}
Unknown
{% endif %}
{% else %}
n/a
{% endif %}
- platform: template
sensors:
harmony_den_activity:
value_template: "{{ state_attr('remote.harmony_hub_den', 'current_activity') }}"
friendly_name: Harmony Den Input
- platform: template
sensors:
harmony_bed_activity:
value_template: "{{ state_attr('remote.harmony_hub_bed', 'current_activity') }}"
friendly_name: Harmony Bed Input
- platform: uptime
- platform: waqi
token: !secret aqi_key
locations:
- losangeles
stations:
- "Reseda, Los Angeles"
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: "/home"
- type: memory_use_percent
- type: processor_use
# - platform: gearbest
# currency: USD
# items:
# - url: https://www.gearbest.com/home-smart-improvements/pp_268522.html
# name: Xiaomi Air Purifier 2
# - url: https://www.gearbest.com/home-smart-improvements/pp_668897.html
# name: Xiaomi Leak Sensor
# - url: https://www.gearbest.com/access-control/pp_626703.html
# name: Xiaomi Contact Sensor
- platform: plex
host: 192.168.1.60
token: !secret plex_token
- platform: speedtest
monitored_conditions:
- ping
- download
- upload
manual: true
#server_id: 7456 #quadranet
#server_id: 2953 #atlantic metro
#server_id: 5861 #webnx
#server_id: 5827 #twc
#server_id: 10564 #speedtest
- platform: cert_expiry
host: !secret cert_expiry_host
- platform: filesize
file_paths:
- /home/homeassistant/.homeassistant/home-assistant_v2.db
- platform: darksky
api_key: !secret darksky_api
units: us
update_interval: "00:05"
monitored_conditions:
- summary
- icon
- apparent_temperature
- temperature
- humidity
- precip_probability
- precip_intensity
- wind_speed
- pressure
- wind_bearing
- precip_type
- nearest_storm_distance
- cloud_cover
- visibility
- platform: zestimate
api_key: !secret zillow_api
zpid:
- !secret zillow_zpid
- platform: rest
resource: !secret plantlink_arti
scan_interval: 6000
method: GET
authentication: basic
headers:
Authorization: !secret plantlink_key
verify_ssl: false
name: Artichoke Status
value_template: >-
{% if value_json.status == '0' %}
Needs Water
{% elif value_json.status == '1' %}
Dry
{% elif value_json.status == '2' %}
Good
{% elif value_json.status == '3' %}
Good
{% elif value_json.status == '4' %}
Too Wet
{% else %}
value_json.status
{% endif %}
- platform: rest
resource: !secret plantlink_arti
scan_interval: 6000
method: GET
authentication: basic
headers:
Authorization: !secret plantlink_key
verify_ssl: false
name: Artichoke Moisture
sensor_class: moisture
unit_of_measurement: '%'
value_template: '{{ (value_json.last_measurements[0]["moisture"]) | round(3) * 100 }}'
- platform: rest
resource: !secret plantlink_arti
scan_interval: 6000
method: GET
authentication: basic
headers:
Authorization: !secret plantlink_key
verify_ssl: false
name: Artichoke Fuel
value_template: '{{ value_json.last_measurements[0]["plant_fuel_level"] | round(3) }}'
- platform: rest
resource: !secret plantlink_arti
scan_interval: 6000
method: GET
authentication: basic
headers:
Authorization: !secret plantlink_key
verify_ssl: false
name: Artichoke Signal
unit_of_measurement: '%'
value_template: '{{ float(value_json.last_measurements[0]["signal"]) * 100 | round(3) }}'
- platform: rest
resource: !secret plantlink_arti
scan_interval: 6000
method: GET
authentication: basic
headers:
Authorization: !secret plantlink_key
verify_ssl: false
name: Artichoke Battery
unit_of_measurement: '%'
value_template: '{{ float(value_json.last_measurements[0]["battery"]) * 100 | round(3) }}'
- platform: rest
resource: !secret plantlink_arti
scan_interval: 6000
method: GET
authentication: basic
headers:
Authorization: !secret plantlink_key
verify_ssl: false
name: Artichoke Last Updated
value_template: '{{ value_json.last_measurements[0]["updated"] | timestamp_local }}'
- platform: rest
resource: !secret plantlink_arti
scan_interval: 6000
method: GET
authentication: basic
headers:
Authorization: !secret plantlink_key
verify_ssl: false
name: Artichoke Next Water
value_template: '{{ value_json.last_measurements[0]["predicted_water_needed"] | timestamp_local }}'
# - platform: geo_rss_events
# name: USGS All Earthquakes
# url: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.atom
# categories:
# - 'Past Hour'
# - 'Past Day'
# - platform: geo_rss_events
# name: NSW Fire Service
# url: http://www.fire.ca.gov/rss/rss.xml
# unit_of_measurement: 'Incidents'