-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinary_sensors.yaml
84 lines (78 loc) · 2.54 KB
/
binary_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
### Uptime Robot ###
- platform: uptimerobot
api_key: uptime_key
### NOAA Aurora Forecast ###
- platform: aurora
name: Aurora Visibility
forecast_threshold: 50
### Flic Smart Button ###
- platform: flic
### Hue motion sensors ###
- platform: hue
### Kitchen Motion Sensor ###
- platform: template
sensors:
kitchen_motion:
friendly_name: Kitchen Motion
device_class: motion
value_template: '{{ states("sensor.kitchen_motion_sensor") == "on" }}'
kitchen_sensor_reachable:
friendly_name: Kitchen Sensor Reachable
device_class: connectivity
value_template: '{{ states.sensor.kitchen_motion_sensor.attributes.reachable }}'
motion_at_home:
value_template: >-
{%- if is_state("sensor.kitchen_motion_sensor", "on")
or is_state("sensor.studio_motion_sensor", "on")
or is_state("sensor.bedroom_motion_sensor", "on")
-%}
True
{%- else -%}
False
{%- endif %}
# Workday
- platform: workday
name: workday
country: US
workdays: [fri, sat, sun]
excludes: [mon, tue, wed, thu, holiday]
# Worknight
- platform: workday
name: worknight
country: US
days_offset: 1
workdays: [fri, sat, sun]
excludes: [mon, tue, wed, thu, holiday]
### Daylight Period ###
- platform: template
period_of_day:
friendly_name: 'Period of the Day'
value_template: >-
{% if (as_timestamp(states.sun.sun.attributes.next_dusk)) - (as_timestamp(states.sun.sun.attributes.next_setting)) < 0 %}
dusk
{% elif (as_timestamp(states.sun.sun.attributes.next_rising)) - (as_timestamp(states.sun.sun.attributes.next_dawn)) < 0 %}
dawn
{% elif (states.sun.sun.attributes.elevation) < -4 %}
night
{% else %}
day
{% endif %}
icon_template: >-
{% if (as_timestamp(states.sun.sun.attributes.next_dusk)) - (as_timestamp(states.sun.sun.attributes.next_setting)) < 0 %}
mdi:weather-sunset-down
{% elif (as_timestamp(states.sun.sun.attributes.next_rising)) - (as_timestamp(states.sun.sun.attributes.next_dawn)) < 0 %}
mdi:weather-sunset-up
{% elif (states.sun.sun.attributes.elevation) < -4 %}
mdi:weather-night
{% else %}
mdi:weather-sunny
{% endif %}
### HA-Dockermon ###
# - platform: hadockermon
# host: 192.168.1.50
# port: 8126
# stats: true
# prefix: hadockermon
# exclude:
# - 'NGINX'
# - 'ha-dockermon'