forked from tchiavegatti/HomeAssistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sensors.yaml
313 lines (258 loc) · 12.3 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
#https://home-assistant.io/components/sensor/
####################################################
# #
# AUTHENTICATED - CUSTOM COMPONENT #
# #
####################################################
#https://github.com/custom-components/sensor.authenticated
- platform: authenticated
enable_notification: 'True'
####################################################
# #
# CERTIFICATE EXPIRY #
# #
####################################################
#https://home-assistant.io/components/sensor.cert_expiry/
- platform: cert_expiry
host: !secret host
port: 8123
name: Lets Encrypt Expiration
####################################################
# #
# COMMAND LINE #
# #
####################################################
#https://www.home-assistant.io/components/sensor.command_line/
- platform: command_line
name: CPU Temperature
command: "cat /sys/class/thermal/thermal_zone0/temp"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(1) }}'
####################################################
# #
# CPU SPEED #
# #
####################################################
#https://home-assistant.io/components/sensor.cpuspeed/
- platform: cpuspeed
name: CPU
####################################################
# #
# DARK SKY WEATHER #
# #
####################################################
#https://www.home-assistant.io/components/sensor.darksky/
- platform: darksky
api_key: !secret darksky
monitored_conditions:
- temperature
- humidity
update_interal: '00:15'
####################################################
# #
# FILESIZE #
# #
####################################################
#https://www.home-assistant.io/components/sensor.filesize/
- platform: filesize
file_paths:
- /config/home-assistant_v2.db
- /config/home-assistant.log
####################################################
# #
# MQTT #
# #
####################################################
#https://home-assistant.io/components/sensor.mqtt/
- platform: mqtt
name: "POW1 Current"
state_topic: "tele/pow1/SENSOR"
value_template: '{{ value_json["ENERGY"]["Current"] }}'
unit_of_measurement: "A"
- platform: mqtt
name: "POW1 Energy"
state_topic: "tele/pow1/SENSOR"
value_template: '{{ value_json["ENERGY"]["Today"] }}'
unit_of_measurement: "kWh"
- platform: mqtt
name: "POW1 Power"
state_topic: "tele/pow1/SENSOR"
value_template: '{{ value_json["ENERGY"]["Power"] }}'
unit_of_measurement: "W"
- platform: mqtt
name: "POW1 Voltage"
state_topic: "tele/pow1/SENSOR"
value_template: '{{ value_json["ENERGY"]["Voltage"] }}'
unit_of_measurement: "V"
####################################################
# #
# NEST SENSORS #
# #
####################################################
#https://home-assistant.io/components/sensor.nest/
- platform: nest
monitored_conditions:
- temperature
- target
- humidity
- operation_mode
- hvac_state
####################################################
# #
# NUT #
# #
####################################################
#https://home-assistant.io/components/sensor.nut/
- platform: nut
resources:
- ups.load
- input.voltage
- battery.runtime
- battery.voltage
- battery.charge
host: 192.168.1.14
port: 3493
name: UPS
####################################################
# #
# REST #
# #
####################################################
#https://www.home-assistant.io/components/sensor.rest/
- platform: rest
resource: https://pypi.python.org/pypi/homeassistant/json
name: Latest Version
value_template: "{{ value_json.info.version }}"
scan_interval: 3600
####################################################
# #
# REST #
# #
####################################################
#https://www.home-assistant.io/components/sensor.speedtest/
- platform: speedtest
monitored_conditions:
- download
- upload
####################################################
# #
# SYNOLOGY #
# #
####################################################
#https://home-assistant.io/components/sensor.synologydsm/
- platform: synologydsm
host: 192.168.1.14
port: 5000
ssl: 'false'
username: !secret nas_username
password: !secret nas_password
monitored_conditions:
- cpu_total_load
- memory_real_usage
- network_up
- network_down
- disk_smart_status
- disk_temp
- volume_percentage_used
####################################################
# #
# SYSTEM MONITOR #
# #
####################################################
#https://home-assistant.io/components/sensor.systemmonitor/
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /home
- type: memory_use_percent
- type: processor_use
- type: since_last_boot
- type: network_in
arg: eno1
- type: network_out
arg: eno1
- type: load_1m
- type: load_5m
- type: load_15m
####################################################
# #
# TEMPLATE #
# #
####################################################
#https://home-assistant.io/components/sensor.template/
- platform: template
sensors:
approxwattage:
unit_of_measurement: 'W'
value_template: '{{ states("sensor.ups_load") | float /100*900 }}'
backdoorstatus:
value_template: "{%if states.sensor.unknown_id021f_unknown_type0003_id0101_access_control.state == '23' %}Closed{% elif states.sensor.unknown_id021f_unknown_type0003_id0101_access_control.state == '22' %}Open{% endif %}"
backdoorstatusbatt:
value_template: '{% if states.zwave.unknown_id021f_unknown_type0003_id0101 %} {{ states.zwave.unknown_id021f_unknown_type0003_id0101.attributes.battery_level }} {% else %} Unknown {% endif %}'
unit_of_measurement: '%'
battery_adamsiphone:
unit_of_measurement: '%'
value_template: '{% if states.device_tracker.adamsiphone %} {{ states.device_tracker.adamsiphone.attributes.battery | round(0) }} {% else %} Unknown {% endif %}'
battery_iphone:
unit_of_measurement: '%'
value_template: '{% if states.device_tracker.amysiphone %} {{ states.device_tracker.amysiphone.attributes.battery | round(0) }} {% else %} Unknown {% endif %}'
charging_adamsiphone:
value_template: '{% if states.device_tracker.adamsiphone %} {{ states.device_tracker.adamsiphone.attributes.battery_status }} {% else %} Unknown {% endif %}'
downstairs_away_mode:
value_template: '{% if states.climate.downstairs %} {{ states.climate.downstairs.attributes.away_mode }} {% else %} Unknown {% endif %}'
garagedoorstatus:
value_template: "{%if states.sensor.vision_zg8101_garage_door_detector_alarm_level.state == '0' %}Closed{% elif states.sensor.vision_zg8101_garage_door_detector_alarm_level.state == '255' %}Open{% endif %}"
garagedoorstatusbatt:
value_template: '{% if states.zwave.vision_zg8101_garage_door_detector %} {{ states.zwave.vision_zg8101_garage_door_detector.attributes.battery_level }} {% else %} Unknown {% endif %}'
unit_of_measurement: '%'
gehingepinsensor1:
value_template: "{%if states.sensor.ge_32563_hinge_pin_smart_door_sensor_access_control.state == '23' %}Closed{% elif states.sensor.ge_32563_hinge_pin_smart_door_sensor_access_control.state == '22' %}Open{% endif %}"
gehingepinsensor1batt:
value_template: '{% if states.zwave.ge_32563_hinge_pin_smart_door_sensor %} {{ states.zwave.ge_32563_hinge_pin_smart_door_sensor.attributes.battery_level }} {% else %} Unknown {% endif %}'
unit_of_measurement: '%'
gehingepinsensor2:
value_template: "{%if states.sensor.ge_32563_hinge_pin_smart_door_sensor_access_control_2.state == '23' %}Closed{% elif states.sensor.ge_32563_hinge_pin_smart_door_sensor_access_control_2.state == '22' %}Open{% endif %}"
gehingepinsensor2batt:
value_template: '{% if states.zwave.ge_32563_hinge_pin_smart_door_sensor_2 %} {{ states.zwave.ge_32563_hinge_pin_smart_door_sensor_2.attributes.battery_level }} {% else %} Unknown {% endif %}'
unit_of_measurement: '%'
gps_adamsiphone:
value_template: '{% if states.device_tracker.adamsiphone %} {{ states.device_tracker.adamsiphone.attributes.gps_accuracy | round(0) }} {% else %} Unknown {% endif %}'
interval_adamsiphone:
unit_of_measurement: 'min'
value_template: '{% if states.device_tracker.adamsiphone %} {{ states.device_tracker.adamsiphone.attributes.interval }} {% else %} Unknown {% endif %}'
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 -%}
{%- if count == 3 -%}
{{ slb[0] ~ ' ' ~ slb[1] ~ ' ' }}
{%- endif -%}
{%- if hours > 0 -%}
{%- if hours == 1 -%}
1 hour
{%- else -%}
{{ hours }} hours
{%- endif -%}
{%- endif -%}
upsstate:
value_template: "{%if states.sensor.ups_load.attributes.state == 'Online' %}Online{% elif states.sensor.ups_load.attributes.state == 'Forced Shutdown Online' %}Forced Shutdown Online{% elif states.sensor.ups_load.attributes.state == 'Online Battery Charging' %}Online Battery Charging{% elif states.sensor.ups_load.attributes.state == 'unknown' %}Power Outage{% endif %}"
wifisignal:
value_template: '{% if states.cover.garage_door %} {{ states.cover.garage_door.attributes.wifi_signal }} {% else %} Unknown {% endif %}'
unit_of_measurement: 'db'
####################################################
# #
# VERSION #
# #
####################################################
#https://www.home-assistant.io/components/sensor.version/
- platform: version
name: Installed Version
####################################################
# #
# END OF CONFIGURATION FILE #
# #
####################################################