-
Notifications
You must be signed in to change notification settings - Fork 17
/
sensors.yaml
executable file
·336 lines (300 loc) · 10 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
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /home
# - type: disk_use_percent
# arg: /mnt/home-media
- type: memory_use_percent
- type: processor_use
- type: last_boot
#- platform: github
# access_token: !secret github_access_token
# repositories:
# - path: "SberHome/infra"
# - path: "SberHome/devops_stuff"
- platform: time_date
display_options:
- "time"
- platform: template
sensors:
currentvoltage_lookin:
friendly_name: Заряд LOOK.in
device_class: battery
unit_of_measurement: "%"
value_template: '{{ [(((states.sensor.look_in_sostoianie.attributes["CurrentVoltage"] | int ) - 4473) / 17.13) | round(2) , 100] | min }}'
# water_level:
# friendly_name: Уровень воды
# unit_of_measurement: "%"
# entity_id: fan.xiaomi_miio_device
# value_template: >-
# {{ [state_attr('fan.xiaomi_miio_device', 'depth') / 1.2, 100] | min | int }}
# icon_template: "mdi:cup"
temperature_nest_set_bedroom:
friendly_name: "Nest установленная температура в спальне"
unit_of_measurement: "°C"
value_template: "{{ state_attr('climate.living_room', 'temperature') }}"
device_class: temperature
temperature_nest_set_living_room:
friendly_name: "Nest установленная температура в гостиной"
unit_of_measurement: "°C"
value_template: "{{ state_attr('climate.dining_room', 'temperature') }}"
device_class: temperature
temperature_nest_bedroom:
friendly_name: "Nest температура в спальне"
unit_of_measurement: "°C"
value_template: "{{ state_attr('climate.living_room', 'current_temperature') }}"
device_class: temperature
temperature_nest_living_room:
friendly_name: "Nest температура в гостиной"
unit_of_measurement: "°C"
value_template: "{{ state_attr('climate.dining_room', 'current_temperature') }}"
device_class: temperature
weight_alex:
friendly_name: "Сашин вес"
value_template: >-
{% set weight = states('sensor.ble_weight_c6da343caecc') | float %}
{% if 74 <= weight <= 80 %}
{{ states("sensor.ble_weight_c6da343caecc") }}
{% else %}
{{ states("sensor.weight_alex") }}
{% endif %}
unit_of_measurement: "kg"
icon_template: mdi:weight-kilogram
weight_lilypad:
friendly_name: "Лилин вес"
value_template: >-
{% set weight = states('sensor.ble_weight_c6da343caecc') | float %}
{% if 52 <= weight <= 57 %}
{{ states("sensor.ble_weight_c6da343caecc") }}
{% else %}
{{ states("sensor.weight_lilypad") }}
{% endif %}
unit_of_measurement: "kg"
icon_template: mdi:weight-kilogram
impedance_alex:
friendly_name: "Impedance Саша"
value_template: >-
{% set weight = states('sensor.ble_weight_c6da343caecc') | float %}
{% if 74 <= weight <= 80 %}
{{ states("sensor.ble_impedance_c6da343caecc") }}
{% else %}
{{ states("sensor.impedance_alex") }}
{% endif %}
unit_of_measurement: "ohm"
icon_template: mdi:omega
impedance_lilypad:
friendly_name: "Impedance Лиля"
value_template: >-
{% set weight = states('sensor.ble_weight_c6da343caecc') | float %}
{% if 52 <= weight <= 57 %}
{{ states("sensor.ble_impedance_c6da343caecc") }}
{% else %}
{{ states("sensor.impedance_lilypad") }}
{% endif %}
unit_of_measurement: "ohm"
icon_template: mdi:omega
# Spruthub
# - platform: "mqtt"
# state_topic: "SprutHub/accessories/84/21/24"
# name: "CO2 Kitchen"
# unit_of_measurement: "ppm"
# icon: mdi:molecule-co2
# - platform: "mqtt"
# state_topic: "SprutHub/accessories/84/11/13"
# name: "Temperature Kitchen"
# unit_of_measurement: "°C"
# device_class: temperature
# icon: mdi:thermometer
# - platform: "mqtt"
# state_topic: "SprutHub/accessories/84/14/16"
# name: "Humidity Kitchen"
# unit_of_measurement: "%"
# device_class: humidity
# icon: mdi:water-percent
# - platform: "mqtt"
# state_topic: "SprutHub/accessories/84/17/20"
# name: "VOC Kitchen"
# unit_of_measurement: "ppm"
# icon: mdi:nuke
# - platform: "mqtt"
# state_topic: "SprutHub/accessories/84/29/31"
# name: "LUX Kitchen"
# unit_of_measurement: "lx"
# device_class: illuminance
# - platform: "mqtt"
# state_topic: "SprutHub/accessories/49/21/24"
# name: "VOC Lifecontrol"
# unit_of_measurement: "ppm"
# icon: mdi:nuke
# - platform: "mqtt"
# state_topic: "SprutHub/accessories/49/11/13"
# name: "Temperature Lifecontrol"
# unit_of_measurement: "°C"
# device_class: temperature
# icon: mdi:thermometer
# - platform: "mqtt"
# state_topic: "SprutHub/accessories/49/14/16"
# name: "Humidity Lifecontrol"
# unit_of_measurement: "%"
# device_class: humidity
# icon: mdi:water-percent
# - platform: "mqtt"
# state_topic: "SprutHub/accessories/49/17/20"
# name: "CO2 Lifecontrol"
# unit_of_measurement: "ppm"
# icon: mdi:molecule-co2
# #Energy
# - platform: mqtt
# name: "Напряжение"
# device_class: voltage
# unit_of_measurement: V
# state_topic: "SprutHub/accessories/102/11/13"
# - platform: mqtt
# name: "Full Energy"
# device_class: energy
# unit_of_measurement: kWh
# state_class: measurement
# state_topic: "SprutHub/accessories/103/14/16"
# - platform: mqtt
# name: "Общee потребление"
# device_class: power
# unit_of_measurement: W
# state_topic: "SprutHub/accessories/103/11/13"
# - platform: mqtt
# name: "PC Energy"
# device_class: energy
# unit_of_measurement: kWh
# state_class: measurement
# state_topic: "SprutHub/accessories/104/14/16"
# - platform: mqtt
# name: "Комп потребление"
# device_class: power
# unit_of_measurement: W
# state_topic: "SprutHub/accessories/104/11/13"
# - platform: mqtt
# name: "Server Energy"
# device_class: energy
# unit_of_measurement: kWh
# state_class: measurement
# state_topic: "SprutHub/accessories/105/14/16"
# - platform: mqtt
# name: "Серверная потребление"
# device_class: power
# unit_of_measurement: W
# state_topic: "SprutHub/accessories/105/11/13"
# - platform: mqtt
# name: "Bedroom Energy"
# device_class: energy
# unit_of_measurement: kWh
# state_class: measurement
# state_topic: "SprutHub/accessories/106/14/16"
# - platform: mqtt
# name: "Спальня потребление"
# device_class: power
# unit_of_measurement: W
# state_topic: "SprutHub/accessories/106/11/13"
# - platform: mqtt
# name: "Childroom Energy"
# device_class: energy
# unit_of_measurement: kWh
# state_class: measurement
# state_topic: "SprutHub/accessories/107/14/16"
# - platform: mqtt
# name: "Детская потребление"
# device_class: power
# unit_of_measurement: W
# state_topic: "SprutHub/accessories/107/11/13"
# - platform: mqtt
# name: "Washing Room Energy"
# device_class: energy
# unit_of_measurement: kWh
# state_class: measurement
# state_topic: "SprutHub/accessories/108/14/16"
# - platform: mqtt
# name: "Прачечная потребление"
# device_class: power
# unit_of_measurement: W
# state_topic: "SprutHub/accessories/108/11/13"
# - platform: mqtt
# name: "Ballu Energy"
# device_class: energy
# state_class: measurement
# unit_of_measurement: kWh
# state_topic: "SprutHub/accessories/63/18/20"
# - platform: mqtt
# name: "Текущее Потребление кондиционера"
# device_class: power
# unit_of_measurement: W
# state_topic: "SprutHub/accessories/63/15/17"
# - platform: "mqtt"
# name: "Вода счетчик 1"
# state_topic: "powermeter/main/value"
# value_template: "{{ value }}"
# unit_of_measurement: "m3"
# icon: "mdi:water"
- platform: rest
resource: http://192.168.1.215/device
name: LOOK.in состояние
scan_interval: 900
json_attributes:
- CurrentVoltage
- BluetoothMode
value_template: "{{ value_json.PowerMode }}"
#- platform: rest
# resource: http://192.168.1.215/sensors/ir/raw
# name: LOOK.in код
# scan_interval: 10
# value_template: "{{ value_json['Raw']['Updated'] }}"
# json_attributes_path: '$.Raw'
# json_attributes:
# - Value
- platform: yandex_maps
start: "device_tracker.liliia"
destination: !secret ya_home
name: Yandex route to home Lilith
- platform: yandex_maps
start: "device_tracker.liliia"
destination: !secret ya_unico
name: Yandex route to work Lilith
- platform: yandex_maps
start: "device_tracker.oxoth1ks_iphone"
destination: !secret ya_home
name: Yandex route to home hunt mf
- platform: yandex_maps
start: "device_tracker.oxoth1ks_iphone"
destination: !secret ya_unico
name: Yandex route to work hunt mf
- platform: command_line
name: curl old gw
unit_of_measurement: "ms"
value_template: "{{ value | multiply(1000) | round(0) }}"
command: !secret old_gw
# - platform: command_line
# name: curl az2
# unit_of_measurement: "ms"
# value_template: "{{ value | multiply(1000) | round(0) }}"
# command: !secret az2
# - platform: command_line
# name: curl az3
# unit_of_measurement: "ms"
# value_template: "{{ value | multiply(1000) | round(0) }}"
# command: !secret az3
- platform: command_line
name: curl new gw
unit_of_measurement: "ms"
value_template: "{{ value | multiply(1000) | round(0) }}"
command: !secret new_gw
- platform: command_line
name: curl prod devices list
value_template: "{{ value_json.results[19].status }}"
command: !secret prod_dev
- platform: min_max
name: Max AZ response
entity_ids:
- sensor.curl_old_gw
- sensor.curl_new_gw
# - sensor.curl_az3
#- platform: command_line
# name: Ikea
# value_template: "{{ value_json.results[19].status }}"
# command: curl -s --user-agent "Mozilla/4.0" 'https://www.ikea.com/ru/ru/' | grep -i -o "вы можете" | wc -l