-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsensors.yaml
657 lines (633 loc) · 18 KB
/
sensors.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
####################################
### Date & Time ###
####################################
### Time & Date ###
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'time_date'
- 'time_utc'
- 'beat'
### Sun Angle ###
- platform: template
sensors:
solar_angle:
friendly_name: "Sun Angle"
unit_of_measurement: '°'
value_template: "{{ '%+.1f'|format(state_attr('sun.sun', 'elevation')) }}"
########################################
### Energy ###
########################################
### OhmConnect ###
- platform: ohmconnect
name: OhmConnect
id: DybV86Jy
########################################
### Weather, Climate, & Enviroment ###
########################################
### Weather Alerts ###
- platform: weatheralerts
sameid: '053033'
### NOAA Space Weather ###
- platform: nooa_space_weather
########################################
### Health ###
########################################
### World Air Quality Index ###
- platform: waqi
token: !secret waqi
locations:
- seattle
stations:
- Olive St
### Mold Indicator ###
- platform: mold_indicator
indoor_temp_sensor: sensor.temp
indoor_humidity_sensor: sensor.humidity
outdoor_temp_sensor: sensor.weather_temperature
calibration_factor: 2.0
### Pollen Sensor ###
- platform: rest
name: pollen_percentage
resource: https://www.pollen.com/api/forecast/current/pollen/98102 <--- ZIP CODE
value_template: "{{value_json.Location.periods[1].Index}}"
scan_interval: 21600
headers:
Referer: "https://www.pollen.com"
- platform: template
sensors:
pollen_level:
friendly_name: 'Pollen Level'
value_template: >
{% if states.sensor.pollen_percentage.state|float <= 2.4 %}Low
{% elif states.sensor.pollen_percentage.state|float <= 4.8 %}Low to Medium
{% elif states.sensor.pollen_percentage.state|float <= 7.2 %}Medium
{% elif states.sensor.pollen_percentage.state|float <= 9.6 %}Medium to High
{% elif states.sensor.pollen_percentage.state|float <= 12.0 %}High
{% else %}Unknown
{% endif %}
### Flu Sensor ###
- platform: rest
name: cold_flu_percentage
resource: https://www.pollen.com/api/forecast/extended/cold/98102 <--- ZIP CODE
value_template: "{{value_json.Location.periods[1].Index}}"
scan_interval: 21600
headers:
Referer: "https://www.pollen.com"
- platform: template
sensors:
cold_flu_risk:
friendly_name: 'Cold & Flu Risk'
value_template: >
{% if states.sensor.cold_flu_percentage.state|float <= 2.4 %}Low
{% elif states.sensor.cold_flu_percentage.state|float <= 4.8 %}Low to Medium
{% elif states.sensor.cold_flu_percentage.state|float <= 7.2 %}Medium
{% elif states.sensor.cold_flu_percentage.state|float <= 9.6 %}Medium to High
{% elif states.sensor.cold_flu_percentage.state|float <= 12.0 %}High
{% else %}Unknown
{% endif %}
### Ambee Climate & Enviroment ###
- platform: rest
resource: https://api.ambeedata.com/latest/pollen/by-lat-lng?lat=LAT&lng=LONG
name: "Ambee Pollen"
scan_interval: 3600
headers:
content-type: "application/json"
x-api-key: "API-KEY"
json_attributes_path: "$.data.['Risk']"
json_attributes:
- tree_pollen
- grass_pollen
- weed_pollen
# Tree Sensor
- platform: template
sensors:
ambee_pollen_tree:
icon_template: "mdi:tree-outline"
friendly_name: "tree"
value_template: >-
{% set state = state_attr('sensor.ambee_pollen', 'tree_pollen') %}
{% if state == "Low" %}Niedrig
{% elif state == "Moderate"%}Mittel
{% elif state == "High"%}Hoch
{% elif state == "Very High"%}Sehr hoch
{% else %}Unbekannt{% endif %}
# Weed Sensor
- platform: template
sensors:
ambee_pollen_weed:
icon_template: "mdi:nature"
friendly_name: "weed"
value_template: >-
{% set state = state_attr('sensor.ambee_pollen', 'weed_pollen') %}
{% if state == "Low" %}Niedrig
{% elif state == "Moderate"%}Mittel
{% elif state == "High"%}Hoch
{% elif state == "Very High"%}Sehr hoch
{% else %}Unbekannt{% endif %}
# Grass Sensor
- platform: template
sensors:
ambee_pollen_grass:
icon_template: "mdi:grass"
friendly_name: "grass"
value_template: >-
{% set state = state_attr('sensor.ambee_pollen', 'grass_pollen') %}
{% if state == "Low" %}Niedrig
{% elif state == "Moderate"%}Mittel
{% elif state == "High"%}Hoch
{% elif state == "Very High"%}Sehr hoch
{% else %}Unbekannt{% endif %}
########################################
## Device Trackers ###
########################################
########################################
### Travel & Navigation ###
########################################
# General Transit Feed Specification (GTFS)
# King County Metro
- platform: gtfs
name: Route 8 - Denny & Bellevue to Denny & Westlake
origin: 2275
destination: 2291
data: king_county_metro
# Sound Transit
- platform: gtfs
name: 1-Line - Capitol Hill to U District
origin: 99603
destination: 990001
data: sound_transit
- platform: gtfs
name: 1-Line - U District to Capitol Hill
origin: 990002
destination: 99603
data: sound_transit
# Washington State Ferries
- platform: gtfs
name: Ferry - Seattle to Bremerton
origin: 74
destination: 47
data: washington_state_ferries
- platform: gtfs
name: Ferry - Seattle to Bainbridge Island
origin: 73
destination: 37
data: washington_state_ferries
- platform: gtfs
name: Ferry - Seattle to Vashon Island
origin: 922
destination: 229
data: washington_state_ferries
# Seattle Streetcar
- platform: gtfs
name: Streetcar - Howell St. to Marion St.
origin: 11175
destination: 41986
data: king_county_metro
- platform: gtfs
name: Streetcar - Howell St. to Terrace St.
origin: 11175
destination: 41988
data: king_county_metro
# NextBus
- platform: nextbus
name: First Hill Streetcar - Broadway & Howell to Broadway & Marion
agency: seattle-sc
route: FHS
stop: 41986
- platform: nextbus
name: First Hill Streetcar - Broadway & Howell to Broadway & Terrace
agency: seattle-sc
route: FHS
stop: 41988
# Washingto State Department of Transportation
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 4
name: Seattle to Everett
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 3
name: Seattle to Everett HOV
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 20
name: Seattle to Federal Way
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 19
name: Seattle to Federal Way HOV
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 27
name: Seattle to Lynwood
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 25
name: Seattle to Lynwood HOV
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 33
name: Seattle to Renton
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 31
name: Seattle to Renton HOV
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 44
name: Seattle to SeaTac
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 42
name: Seattle to SeaTac HOV
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 74
name: Seattle to Issaquah
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 72
name: Seattle to Issaquah HOV
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 80
name: Seattle to Redmond
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 78
name: Seattle to Redmond HOV
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 84
name: Seattle to Redmond via I-90
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 82
name: Seattle to Redmond via I-90 HOV
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 92
name: Seattle to Bellevue via 520
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 91
name: Seattle to Bellevue via 520 HOV
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 96
name: Seattle to Bellevue
- platform: wsdot
api_key: 1a71039c-0fbc-4f21-800b-b487b223b191
travel_time:
- id: 95
name: Seattle to Bellevue HOV
########################################
### Media Players & Services ###
########################################
### Last.fm ###
- platform: lastfm
api_key: !secret lastfm_key
users:
- ozonethegreat
### Xbox Live ###
- platform: xbox_live
api_key: !secret xbox_api
xuid:
- 2533274965606388
### Sonarr ###
- platform: sonarr
api_key: !secret sonarr_key
host: !secret cyborg_ip
port: !secret sonarr_port
monitored_conditions:
- series
- upcoming
- wanted
- queue
- commands
- diskspace
days: 7
unit: GB
### Radarr ###
- platform: radarr
api_key: !secret radarr_key
### Trakt.tv ###
- platform: trakt
id: '!secret trakt_id'
secret: '!secret trakt_secret'
username: !secret alt_user
days: 14
### Discogs ###
- platform: discogs
token: !secret discogs_token
name: Discogs Collection
### Kodi Recently Added ###
- platform: kodi_recently_added
username: !secret username
host: 192.168.1.7
password: !secret password
port: !secret kodi_port
### Trakt.tv Upcoming ###
# - platform: trakt
# id: '!secret trakt_id'
# secret: '!secret trakt_secret'
# username: iamozone
# days: 10
# exclude:
# 'The Bachelor'
### Sonarr Upcoming Media ###
- platform: sonarr_upcoming_media
api_key: !secret sonarr_key
host: 192.168.1.7
port: !secret sonarr_port
days: 2
ssl: true
max: 10
### Radarr Upcoming Media ###
# - platform: radarr_upcoming_media
# api_key: !secret radarr_keyY
# host: 192.168.1.7
# port: 7878
# days: 120
# ssl: true
# theaters: false
# max: 10
### Plex Recently Added ###
# - platform: plex_recently_added
# token: !secret plex_token
# server_name: Cyborg
# ssl: true
# ssl_cert: false
# download_images: false
# max: 5
# section_types:
# - movie
# - show
########################################
### News ###
########################################
### Feedparser ###
# - platform: feedparser
# name: Engineering Feed
# feed_url: 'https://www.sciencedaily.com/rss/matter_energy/engineering.xml'
# date_format: '%a, %b %d %I:%M %p'
# inclusions:
# - title
# - link
# - description
# - image
# - language
# - pubDate
# exclusions:
# - language
########################################
### Finance ###
########################################
### Coin Market Cap ###
- platform: coinmarketcap
currency_id: 1
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 1831
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 2083
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 2222
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 2575
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 463
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 1027
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 52
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 2
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 1321
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 74
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 512
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 2010
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 825
display_currency: USD
display_currency_decimals: 2
- platform: coinmarketcap
currency_id: 1720
display_currency: USD
display_currency_decimals: 2
### Alpha Vantange ###
- platform: alpha_vantage
api_key: !secret alpha_key
# Stocks
symbols:
- symbol: GOOGL
name: Google
- symbol: FB
name: Facebook
########################################
### Network Info & Services ###
########################################
### Speedtest.net ###
- platform: speedtest
minute:
- 0
- 30
monitored_conditions:
- ping
- download
- upload
### HaveIBeenPwned? ###
- platform: haveibeenpwned
email:
- !secret email
### Pi-hole ###
- platform: pi_hole
host: localhost:4865
monitored_conditions:
- ads_blocked_today
- ads_percentage_today
- dns_queries_today
- domains_being_blocked
- queries_cached
- queries_forwarded
- unique_clients
- unique_domains
- clients_ever_seen
### External IP ###
- platform: rest
scan_interval: 86400
resource: http://ip.jsontest.com
name: External IP
value_template: '{{ value_json.ip }}'
########################################
### System Information ###
########################################
### Uptime ###
- platform: uptime
name: Time Online
unit_of_measurement: hours
- platform: command_line
name: "HA Uptime"
command: echo "$(($(date +%s) - $(date -d "$(head -n1 /config/home-assistant.log | cut -d' ' -f-2)" +%s)))"
scan_interval: 720
value_template: >-
{% set uptime = value | int %}
{% set seconds = uptime % 60 %}
{% set minutes = ((uptime % 3600) / 60) | int %}
{% set hours = ((uptime % 86400) / 3600) | int %}
{% set days = (uptime / 86400) | int %}
{%- if days > 0 -%}
{%- if days == 1 -%}
1 day
{%- else -%}
{{ days }} days
{%- endif -%}
{{ ', ' }}
{%- endif -%}
{%- if hours > 0 -%}
{%- if hours == 1 -%}
1 hour
{%- else -%}
{{ hours }} hours
{%- endif -%}
{{ ', ' }}
{%- endif -%}
{%- if minutes > 0 -%}
{%- if minutes == 1 -%}
1 minute
{%- else -%}
{{ minutes }} minutes
{%- endif -%}
{%- endif -%}
# Since Last Boot Completed
- platform: template
sensors:
since_last_boot_templated:
value_template: >-
{%- set slb = states.sensor.since_last_boot.state.split(' ') -%}
{%- set count = slb | length -%}
{%- set hms = slb[count - 1] -%}
{%- set hms_trimmed = hms.split('.')[0] -%}
{%- set hms_split = hms_trimmed.split(':') -%}
{%- set hours = hms_split[0] | int -%}
{%- set minutes = hms_split[1] | int -%}
{%- set seconds = hms_split[2] | int -%}
{%- if count == 3 -%}
{{ slb[0] ~ ' ' ~ slb[1] ~ ' ' }}
{%- endif -%}
{%- if hours > 0 -%}
{%- if hours == 1 -%}
1 hour
{%- else -%}
{{ hours }} hours
{%- endif -%}
{%- endif -%}
{%- if minutes > 0 -%}
{%- if hours > 0 -%}
{{ ', ' }}
{%- endif -%}
{%- if minutes == 1 -%}
1 minute
{%- else -%}
{{ minutes }} minutes
{%- endif -%}
{%- endif -%}
{%- if seconds > 0 -%}
{%- if hours > 0 or minutes > 0 -%}
{{ ', ' }}
{%- endif -%}
{%- if seconds == 1 -%}
1 second
{%- else -%}
{{ seconds }} seconds
{%- endif -%}
{%- endif -%}
### Current Version ###
- platform: version
name: version_current
### Available Version ###
- platform: version
name: version_available
source: hassio
branch: beta
### Power Supply Check ###
- platform: rpi_power
########################################
### Misc ###
########################################
### Space Launch ###
- platform: launch_library
### Aftership Package Tracking ###
- platform: aftership
api_key: !secret aftership_key
### Crime Reports ###
- platform: crimereports
name: Capitol Hill Crime Reports
radius: 1000
# Horizontal Lines
- platform: template
sensors:
hline_1:
value_template: hline
hline_2:
value_template: hline
hline_3:
value_template: hline
hline_4:
value_template: hline
### Brewdog ###
- platform: brewdog