-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsensors.yaml
executable file
·253 lines (246 loc) · 9.02 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
---
# sensors.yaml
- platform: wunderground
api_key: !secret wunderground_api_key
pws_id: !secret wunderground_station_id
monitored_conditions:
- weather
- temp_f
- relative_humidity
- feelslike_f
- heat_index_f
- temp_high_1d_f
- temp_low_1d_f
- precip_1d
- precip_today_in
- pressure_in
- pressure_trend
- wind_mph
- wind_gust_mph
- wind_dir
- visibility_mi
- UV
- alerts
- observation_time
- weather_1d
- weather_1n
- weather_2d
- weather_2n
- weather_3d
- weather_3n
- weather_4d
- weather_4n
- platform: nut
name: ups
host: !secret ups_addr
#username: !secret ups_user
#password: !secret ups_pass
alias: ups
resources:
- ups.status
- ups.load
- input.voltage
- battery.charge
# HASS versions installed and available for notifications
- platform: command_line
command: python3 -c "import requests; print(requests.get('https://pypi.python.org/pypi/homeassistant/json').json()['info']['version'])"
name: ver_current
scan_interval: 86400
- platform: command_line
command: /srv/homeassistant/bin/hass --version
name: ver_installed
scan_interval: 86400
- platform: speedtest
monitored_conditions:
- ping
- download
- upload
minute:
- 30
# Teamplate sensors
# Battery life from z-wave devices
# Sun attributes: rise, set, state
- platform: template
sensors:
master_closet_motion_battery:
value_template: '{{ states.zwave.master_closet_motion.attributes.battery_level }}'
friendly_name: 'Master Closet Motion Detector'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.master_closet_motion.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
kennel_motion_battery:
value_template: '{{states.zwave.kennel_motion.attributes.battery_level}}'
friendly_name: 'Kennel Motion Detector'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.kennel_motion.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
# garage_sensor_battery:
# value_template: '{{states.zwave.garage_door_reed.attributes.battery_level}}'
# friendly_name: 'Garage Door Sensor'
# unit_of_measurement: '%'
# icon_template: >
# {% set battery_level = states.zwave.garage_door_reed.attributes.battery_level|default(0)|int %}
# {% set battery_round = (battery_level / 10) |int * 10 %}
# {% if battery_round >= 100 %}
# mdi:battery
# {% elif battery_round > 0 %}
# mdi:battery-{{ battery_round }}
# {% else %}
# mdi:battery-alert
# {% endif %}
frontdoor_lock_battery:
value_template: '{{states.zwave.front_door_lock.attributes.battery_level}}'
friendly_name: 'Front Door Lock'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.front_door_lock.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
garagedoor_lock_battery:
value_template: '{{states.zwave.garage_door_lock.attributes.battery_level}}'
friendly_name: 'Garage Door Lock'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.garage_door_lock.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
fr_upper_left_window_shade_battery:
value_template: '{{ states.zwave.fr_upper_left_window_shade.attributes.battery_level }}'
friendly_name: 'Family Room Left Blind'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.fr_upper_left_window_shade.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
fr_upper_right_window_shade_battery:
value_template: '{{ states.zwave.fr_upper_right_window_shade.attributes.battery_level }}'
friendly_name: 'Family Room Right Blind'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.fr_upper_right_window_shade.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
fr_upper_left_window_remote_battery:
value_template: '{{ states.zwave.fr_upper_left_window_remote.attributes.battery_level }}'
friendly_name: 'Family Room Left Blind Remote'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.fr_upper_left_window_remote.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
fr_upper_right_window_remote_battery:
value_template: '{{ states.zwave.fr_upper_right_window_remote.attributes.battery_level }}'
friendly_name: 'Family Room Right Blind Remote'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.fr_upper_right_window_remote.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
interior_garage_door_battery:
value_template: '{{ states.zwave.interior_garage_door.attributes.battery_level }}'
friendly_name: 'Interior Garage Door'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.interior_garage_door.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
basement_door_battery:
value_template: '{{ states.zwave.basement_door.attributes.battery_level }}'
friendly_name: 'Basement Door'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.basement_door.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
front_door_battery:
value_template: '{{ states.zwave.front_door.attributes.battery_level }}'
friendly_name: 'Front Door'
unit_of_measurement: '%'
icon_template: >
{% set battery_level = states.zwave.front_door.attributes.battery_level|default(0)|int %}
{% set battery_round = (battery_level / 10) |int * 10 %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
next_set:
value_template: '{{ (as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_local).split(" ")[1] }}'
friendly_name: 'Next Sunset'
next_rise:
value_template: '{{ (as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_local).split(" ")[1] }}'
friendly_name: 'Next Sunrise'
sun:
value_template: >-
{%- if states.sun.sun.state == 'above_horizon' -%}
Up
{%- else -%}
Down
{%- endif %}
friendly_name: 'Sun'