@homebridge-plugins/homebridge-tado 6.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +152 -0
  2. package/LICENSE +21 -0
  3. package/README.md +560 -0
  4. package/config.schema.json +878 -0
  5. package/homebridge-ui/public/css/style.css +25 -0
  6. package/homebridge-ui/public/images/tado_logo.png +0 -0
  7. package/homebridge-ui/public/index.html +118 -0
  8. package/homebridge-ui/public/js/main.js +1582 -0
  9. package/homebridge-ui/public/js/modules/compareVersions.min.js +1 -0
  10. package/homebridge-ui/public/js/modules/jquery.min.js +2 -0
  11. package/homebridge-ui/public/js/modules/progressbar.min.js +6 -0
  12. package/homebridge-ui/public/js/progressbars.js +48 -0
  13. package/homebridge-ui/public/js/schema.js +864 -0
  14. package/homebridge-ui/server.js +80 -0
  15. package/images/tado_logo.png +0 -0
  16. package/index.js +14 -0
  17. package/package.json +66 -0
  18. package/src/accessories/airquality.js +56 -0
  19. package/src/accessories/contact.js +124 -0
  20. package/src/accessories/faucet.js +63 -0
  21. package/src/accessories/heatercooler.js +333 -0
  22. package/src/accessories/humidity.js +90 -0
  23. package/src/accessories/lightbulb.js +59 -0
  24. package/src/accessories/lightsensor.js +40 -0
  25. package/src/accessories/motion.js +79 -0
  26. package/src/accessories/occupancy.js +45 -0
  27. package/src/accessories/security.js +79 -0
  28. package/src/accessories/switch.js +261 -0
  29. package/src/accessories/temperature.js +95 -0
  30. package/src/accessories/thermostat.js +337 -0
  31. package/src/helper/handler.js +1467 -0
  32. package/src/helper/logger.js +51 -0
  33. package/src/helper/telegram.js +60 -0
  34. package/src/platform.js +337 -0
  35. package/src/tado/tado-api.js +404 -0
  36. package/src/tado/tado-config.js +1032 -0
  37. package/src/types/custom.js +264 -0
  38. package/src/types/eve.js +337 -0
@@ -0,0 +1,864 @@
1
+ /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "schema" }]*/
2
+
3
+ const schema = {
4
+ 'schema': {
5
+ 'name': {
6
+ 'title': 'Name',
7
+ 'type': 'string',
8
+ 'default': 'TadoPlatform',
9
+ 'description': 'Name for the log.'
10
+ },
11
+ 'debug': {
12
+ 'title': 'Debug',
13
+ 'type': 'boolean',
14
+ 'description': 'Enables additional output in the log.'
15
+ },
16
+ 'homes': {
17
+ 'title': ' ',
18
+ 'type': 'object',
19
+ 'properties': {
20
+ 'id': {
21
+ 'title': 'Home ID',
22
+ 'description': 'The id of your Home. Has to be the exact same id as in the web app of Tado.',
23
+ 'type': 'integer'
24
+ },
25
+ 'name': {
26
+ 'title': 'Home Name',
27
+ 'description': 'The name of your Home. Has to be the exact same name as in the web app of Tado.',
28
+ 'type': 'string',
29
+ 'required': true
30
+ },
31
+ 'username': {
32
+ 'title': 'Username',
33
+ 'type': 'string',
34
+ 'description': 'The user name that you use for the app and the web app of Tado.',
35
+ 'required': true
36
+ },
37
+ 'password': {
38
+ 'title': 'Password',
39
+ 'type': 'string',
40
+ 'description': 'The password that you use for the app and the web app of Tado.',
41
+ 'required': true
42
+ },
43
+ 'polling': {
44
+ 'title': 'Polling',
45
+ 'description': 'The polling interval in seconds.',
46
+ 'type': 'integer',
47
+ 'default': 30,
48
+ 'minimum': 30
49
+ },
50
+ 'temperatureUnit': {
51
+ 'title': 'Temperature Unit',
52
+ 'description': 'Temperature Unit for accessories in HomeKit exposed by this plugin.',
53
+ 'type': 'string',
54
+ 'default': 'CELSIUS',
55
+ 'oneOf': [
56
+ {
57
+ 'title': 'Celsius',
58
+ 'enum': [
59
+ 'CELSIUS'
60
+ ]
61
+ },
62
+ {
63
+ 'title': 'Fahrenheit',
64
+ 'enum': [
65
+ 'FAHRENHEIT'
66
+ ]
67
+ }
68
+ ]
69
+ },
70
+ 'geolocation': {
71
+ 'title': 'Location',
72
+ 'type': 'object',
73
+ 'properties': {
74
+ 'longitude': {
75
+ 'title': 'Longitude',
76
+ 'type': 'string',
77
+ 'description': 'Longitude coordinate of your home. (Used for Air Quality)'
78
+ },
79
+ 'latitude': {
80
+ 'title': 'Latitude',
81
+ 'type': 'string',
82
+ 'description': 'Latitude coordinate of your home. (Used for Air Quality)'
83
+ }
84
+ }
85
+ },
86
+ 'presence': {
87
+ 'title': 'Presence',
88
+ 'type': 'object',
89
+ 'properties': {
90
+ 'anyone': {
91
+ 'title': 'Anyone Sensor',
92
+ 'type': 'boolean',
93
+ 'description': 'Exposes Anyone Sensor to Apple Home.'
94
+ },
95
+ 'accTypeAnyone': {
96
+ 'title': 'Anyone Accessory Type',
97
+ 'type': 'string',
98
+ 'condition': {
99
+ 'functionBody': 'try { return model.homes.presence.anyone } catch(e){ return false }'
100
+ },
101
+ 'oneOf': [
102
+ {
103
+ 'title': 'Occupancy',
104
+ 'enum': [
105
+ 'OCCUPANCY'
106
+ ]
107
+ },
108
+ {
109
+ 'title': 'Motion',
110
+ 'enum': [
111
+ 'MOTION'
112
+ ]
113
+ }
114
+ ],
115
+ 'description': 'The accessory type for \'anyone\' sensor.'
116
+ },
117
+ 'user': {
118
+ 'title': 'User',
119
+ 'type': 'array',
120
+ 'items': {
121
+ 'type': 'object',
122
+ 'properties': {
123
+ 'active': {
124
+ 'title': 'Active',
125
+ 'type': 'boolean',
126
+ 'description': 'If enabled, a new motion/occupancy sensor for this user will be exposed to HomeKit.'
127
+ },
128
+ 'name': {
129
+ 'title': 'Name',
130
+ 'type': 'string',
131
+ 'description': 'Name of the user for the motion/occupancy sensor.',
132
+ 'required': true
133
+ },
134
+ 'accType': {
135
+ 'title': 'Accessory Type',
136
+ 'type': 'string',
137
+ 'condition': {
138
+ 'functionBody': 'try { return model.homes.presence.user[arrayIndices[0]].active } catch(e){ return false }'
139
+ },
140
+ 'oneOf': [
141
+ {
142
+ 'title': 'Occupancy',
143
+ 'enum': [
144
+ 'OCCUPANCY'
145
+ ]
146
+ },
147
+ {
148
+ 'title': 'Motion',
149
+ 'enum': [
150
+ 'MOTION'
151
+ ]
152
+ }
153
+ ],
154
+ 'description': 'The accessory type of the device.'
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ },
161
+ 'weather': {
162
+ 'title': 'Weather',
163
+ 'type': 'object',
164
+ 'properties': {
165
+ 'temperatureSensor': {
166
+ 'title': 'Temperature Sensor',
167
+ 'type': 'boolean',
168
+ 'description': 'If enabled, a temperature sensor for the weather will be exposed to HomeKit.'
169
+ },
170
+ 'solarIntensity': {
171
+ 'title': 'Solar Intensity',
172
+ 'type': 'boolean',
173
+ 'description': 'If enabled, a lightbulb accessory for the solar intensity will be exposed to HomeKit.'
174
+ },
175
+ 'accTypeSolarIntensity': {
176
+ 'title': 'Solar Intensity Accessory Type',
177
+ 'type': 'string',
178
+ 'condition': {
179
+ 'functionBody': 'try { return model.homes.weather.solarIntensity } catch(e){ return false }'
180
+ },
181
+ 'oneOf': [
182
+ {
183
+ 'title': 'Lightbulb',
184
+ 'enum': [
185
+ 'LIGHTBULB'
186
+ ]
187
+ },
188
+ {
189
+ 'title': 'Sensor',
190
+ 'enum': [
191
+ 'SENSOR'
192
+ ]
193
+ }
194
+ ],
195
+ 'description': 'The accessory type of the device.'
196
+ },
197
+ 'airQuality': {
198
+ 'title': 'Air Quality',
199
+ 'type': 'boolean',
200
+ 'description': 'If enabled, a air quality sensor will be exposed to HomeKit. (Longitute and Latitude must be set in the config)'
201
+ }
202
+ }
203
+ },
204
+ 'extras': {
205
+ 'title': 'Extras',
206
+ 'type': 'object',
207
+ 'properties': {
208
+ 'centralSwitch': {
209
+ 'title': 'Central Switch',
210
+ 'type': 'boolean',
211
+ 'description': 'If enabled, a switch will be exposed to HomeKit to enable/disable all thermostats/boiler at once.'
212
+ },
213
+ 'runningInformation': {
214
+ 'title': 'Heat Running Information',
215
+ 'type': 'boolean',
216
+ 'description': 'If enabled, the central switch will get custom characteristics to show a summary of the heat running in hours.',
217
+ 'condition': {
218
+ 'functionBody': 'try { return model.homes.extras.centralSwitch } catch(e){ return false }'
219
+ }
220
+ },
221
+ 'presenceLock': {
222
+ 'title': 'Presence Lock',
223
+ 'type': 'boolean',
224
+ 'description': 'If enabled, a Home/Away switch will be exposed to HomeKit.'
225
+ },
226
+ 'accTypePresenceLock': {
227
+ 'title': 'Presence Lock Accessory Type',
228
+ 'type': 'string',
229
+ 'oneOf': [
230
+ {
231
+ 'title': 'Security System',
232
+ 'enum': [
233
+ 'ALARM'
234
+ ]
235
+ },
236
+ {
237
+ 'title': 'Switch',
238
+ 'enum': [
239
+ 'SWITCH'
240
+ ]
241
+ }
242
+ ],
243
+ 'description': 'The accessory type of the presence lock.'
244
+ },
245
+ 'boostSwitch': {
246
+ 'title': 'Boost Switch',
247
+ 'type': 'boolean',
248
+ 'condition': {
249
+ 'functionBody': 'try { return model.homes.extras.centralSwitch } catch(e){ return false }'
250
+ },
251
+ 'description': 'If enabled, a boost heat switch will be added to the central switch.'
252
+ },
253
+ 'sheduleSwitch': {
254
+ 'title': 'Shedule Switch',
255
+ 'type': 'boolean',
256
+ 'condition': {
257
+ 'functionBody': 'try { return model.homes.extras.centralSwitch } catch(e){ return false }'
258
+ },
259
+ 'description': 'If enabled, a shedule heat switch will be added to the central switch.'
260
+ },
261
+ 'turnoffSwitch': {
262
+ 'title': 'Turn Off Switch',
263
+ 'type': 'boolean',
264
+ 'condition': {
265
+ 'functionBody': 'try { return model.homes.extras.centralSwitch } catch(e){ return false }'
266
+ },
267
+ 'description': 'If enabled, a turn off heat switch will be added to the central switch.'
268
+ },
269
+ 'dummySwitch': {
270
+ 'title': 'Dummy Switch',
271
+ 'type': 'boolean',
272
+ 'condition': {
273
+ 'functionBody': 'try { return model.homes.extras.centralSwitch } catch(e){ return false }'
274
+ },
275
+ 'description': 'If enabled, a dummy switch (for eg automation purposes) will be added to the central switch.'
276
+ },
277
+ 'childLockSwitches': {
278
+ 'title': 'Child Lock Switches',
279
+ 'type': 'array',
280
+ 'items': {
281
+ 'type': 'object',
282
+ 'properties': {
283
+ 'active': {
284
+ 'title': 'Active',
285
+ 'type': 'boolean',
286
+ 'description': 'If enabled, a child lock switch for this device will be exposed to HomeKit.'
287
+ },
288
+ 'name': {
289
+ 'title': 'Name',
290
+ 'type': 'string',
291
+ 'description': 'Name for the Child Lock Switch.',
292
+ 'required': true
293
+ },
294
+ 'serialNumber': {
295
+ 'title': 'Device Serial Number',
296
+ 'type': 'string',
297
+ 'description': 'Enter the serial number of the device from which you want to display a \'Child Lock Switch\' in HomeKit. (only for devices with child lock support)',
298
+ 'required': true,
299
+ 'condition': {
300
+ 'functionBody': 'try { return model.homes.extras.childLockSwitches[arrayIndices[0]].active } catch(e){ return false }'
301
+ }
302
+ }
303
+ }
304
+ }
305
+ }
306
+ }
307
+ },
308
+ 'zones': {
309
+ 'title': 'Zones',
310
+ 'type': 'array',
311
+ 'items': {
312
+ 'type': 'object',
313
+ 'properties': {
314
+ 'active': {
315
+ 'title': 'Active',
316
+ 'type': 'boolean',
317
+ 'description': 'If enabled, a new thermostat/boiler switch will be exposed to HomeKit.'
318
+ },
319
+ 'id': {
320
+ 'title': 'ID',
321
+ 'type': 'integer',
322
+ 'description': 'Zone ID. Has to be the exact same id as in the web app of Tado.',
323
+ 'condition': {
324
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].active } catch(e){ return false }'
325
+ }
326
+ },
327
+ 'name': {
328
+ 'title': 'Name',
329
+ 'type': 'string',
330
+ 'description': 'Zone Name. Has to be the exact same name as in the web app of Tado.',
331
+ 'required': true
332
+ },
333
+ 'delaySwitch': {
334
+ 'title': 'Delay Switch',
335
+ 'type': 'boolean',
336
+ 'description': 'If enabled, additional delay switch characteristic for each zone will be within the accessory. If the delay switch is turned on, the thermostat/boiler will not change state until delay is turned off (timer adjustable within accessory).'
337
+ },
338
+ 'autoOffDelay': {
339
+ 'title': 'Auto Off',
340
+ 'type': 'boolean',
341
+ 'description': 'If enabled, the delay switch will not affect the thermostats and it automatically turns off after the period has expired.'
342
+ },
343
+ 'openWindowSensor': {
344
+ 'title': 'Open Window Sensor',
345
+ 'type': 'boolean',
346
+ 'description': 'If enabled, additional window contact accessory for each zone will be exposed to HomeKit which triggers if tado detects an open window.'
347
+ },
348
+ 'openWindowSwitch': {
349
+ 'title': 'Open Window Switch',
350
+ 'type': 'boolean',
351
+ 'description': 'If enabled, additional window switch accessory for each zone will be exposed to HomeKit to trigger and enable/disable open window.'
352
+ },
353
+ 'airQuality': {
354
+ 'title': 'Room Air Quality Sensor',
355
+ 'type': 'boolean',
356
+ 'description': 'If enabled, the thermostat/heater cooler accessory will also show an air quality indicator.',
357
+ 'condition': {
358
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].type === \'HEATING\' } catch(e){ return false }'
359
+ }
360
+ },
361
+ 'separateTemperature': {
362
+ 'title': 'Separate Temperature Sensors',
363
+ 'type': 'boolean',
364
+ 'description': 'If enabled, the temperature sensor will be shown as extra accessory.'
365
+ },
366
+ 'separateHumidity': {
367
+ 'title': 'Separate Humidity Sensors',
368
+ 'type': 'boolean',
369
+ 'description': 'If enabled, the humidity sensor will be shown as extra accessory.',
370
+ 'condition': {
371
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].type === \'HEATING\' } catch(e){ return false }'
372
+ }
373
+ },
374
+ 'minStep': {
375
+ 'title': 'Temperature Step',
376
+ 'type': 'string',
377
+ 'description': 'Minimum step for temperature adjustment. (Default: 1, must be between 0 - 1)'
378
+ },
379
+ 'minValue': {
380
+ 'title': 'Minimum Temperature',
381
+ 'type': 'integer',
382
+ 'description': 'Minimum adjustable temperature value (in celsius/fahrenheit). HEATING devices also this plugin, supports a minValue of 5° Celsius / 41° Fahrenheit by default. HOT WATER devices, also this plugin, supports a minValue of of 30° Celsius / 86° Fahrenheit by default. If your device has a different minValue, you can set it up here. (Incorrect minValue may cause problems!)'
383
+ },
384
+ 'maxValue': {
385
+ 'title': 'Maximum Temperature',
386
+ 'type': 'integer',
387
+ 'description': 'Maximum adjustable temperature value (in celsius/fahrenheit). HEATING devices also this plugin, supports a maxValue of 25° Celsius / 77° Fahrenheit by default. HOT WATER devices, also this plugin, supports a maxValue of of 65° Celsius / 149° Fahrenheit by default. If your device has a different maxValue, you can set it up here. (Incorrect maxValue may cause problems!)'
388
+ },
389
+ 'mode': {
390
+ 'title': 'Termination Mode',
391
+ 'type': 'string',
392
+ 'required': true,
393
+ 'oneOf': [
394
+ {
395
+ 'title': 'Auto',
396
+ 'enum': [
397
+ 'AUTO'
398
+ ]
399
+ },
400
+ {
401
+ 'title': 'Manual',
402
+ 'enum': [
403
+ 'MANUAL'
404
+ ]
405
+ },
406
+ {
407
+ 'title': 'Timer',
408
+ 'enum': [
409
+ 'TIMER'
410
+ ]
411
+ },
412
+ {
413
+ 'title': 'Custom',
414
+ 'enum': [
415
+ 'CUSTOM'
416
+ ]
417
+ }
418
+ ],
419
+ 'description': 'Mode for the commands to be sent with. can be \'MANUAL\' for manual control until ended by the user, \'AUTO\' for manual control until next schedule change in tado° app, \'TIMER\' for manual control until timer ends or \'CUSTOM\' for a mixed use of MANUAL (off) and AUTO (on). (CUSTOM is only for HEATING types with easyMode enabled and HOT_WATER types with temperature support).'
420
+ },
421
+ 'modeTimer': {
422
+ 'title': 'Timer',
423
+ 'description': 'Timer for the manual mode in minutes.',
424
+ 'type': 'integer',
425
+ 'minimum': 1,
426
+ 'condition': {
427
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].mode === \'TIMER\' } catch(e){ return false }'
428
+ }
429
+ },
430
+ 'easyMode': {
431
+ 'title': 'Simple Target Mode',
432
+ 'type': 'boolean',
433
+ 'condition': {
434
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].type === \'HEATING\' } catch(e){ return false }'
435
+ },
436
+ 'description': 'If enabled, only \'ON | OFF\' target modes are visible for the thermostat.'
437
+ },
438
+ 'noBattery': {
439
+ 'title': 'No Battery',
440
+ 'type': 'boolean',
441
+ 'condition': {
442
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].type === \'HEATING\' } catch(e){ return false }'
443
+ },
444
+ 'description': 'If enabled, the battery indicator will be removed from HomeKit.'
445
+ },
446
+ 'type': {
447
+ 'title': 'Type',
448
+ 'type': 'string',
449
+ 'required': true,
450
+ 'oneOf': [
451
+ {
452
+ 'title': 'Heating',
453
+ 'enum': [
454
+ 'HEATING'
455
+ ]
456
+ },
457
+ {
458
+ 'title': 'Hot Water',
459
+ 'enum': [
460
+ 'HOT_WATER'
461
+ ]
462
+ }
463
+ ],
464
+ 'description': 'Zone Heating type.'
465
+ },
466
+ 'boilerTempSupport': {
467
+ 'title': 'Boiler (Hot Water) with temperature adjustment',
468
+ 'type': 'boolean',
469
+ 'description': 'Enable this if your can also adjust the temperature from your hot water.'
470
+ },
471
+ 'accTypeBoiler': {
472
+ 'title': 'Boiler (Hot Water) Accessory Type',
473
+ 'type': 'string',
474
+ 'oneOf': [
475
+ {
476
+ 'title': 'Faucet',
477
+ 'enum': [
478
+ 'FAUCET'
479
+ ]
480
+ },
481
+ {
482
+ 'title': 'Switch',
483
+ 'enum': [
484
+ 'SWITCH'
485
+ ]
486
+ }
487
+ ],
488
+ 'description': 'Boiler accessory type.'
489
+ }
490
+ }
491
+ }
492
+ },
493
+ 'telegram': {
494
+ 'titel': 'Telegram',
495
+ 'type': 'object',
496
+ 'properties': {
497
+ 'active': {
498
+ 'title': 'Active',
499
+ 'description': 'Activates Telegram.',
500
+ 'type': 'boolean',
501
+ 'required': true,
502
+ 'default': false
503
+ },
504
+ 'token': {
505
+ 'title': 'Token',
506
+ 'type': 'string',
507
+ 'description': 'Telegram Bot Token.',
508
+ 'required': true
509
+ },
510
+ 'chatID': {
511
+ 'title': 'Chat ID',
512
+ 'type': 'string',
513
+ 'description': 'Telegram Chat ID.',
514
+ 'required': true
515
+ },
516
+ 'messages': {
517
+ 'title': 'Messages',
518
+ 'type': 'object',
519
+ 'properties': {
520
+ 'presence': {
521
+ 'title': 'Presence',
522
+ 'type': 'object',
523
+ 'properties': {
524
+ 'user_in': {
525
+ 'title': 'User Detected',
526
+ 'type': 'string',
527
+ 'description': 'Message if user detected. (Hint: @ will be replaced with accessory name)'
528
+ },
529
+ 'user_out': {
530
+ 'title': 'User Not Detected',
531
+ 'type': 'string',
532
+ 'description': 'Message if user not detected anymore. (Hint: @ will be replaced with accessory name)'
533
+ },
534
+ 'anyone_in': {
535
+ 'title': 'Anyone Detected',
536
+ 'type': 'string',
537
+ 'description': 'Message if anyone detected.'
538
+ },
539
+ 'anyone_out': {
540
+ 'title': 'Anyone Not Detected',
541
+ 'type': 'string',
542
+ 'description': 'Message if nobody detected.'
543
+ }
544
+ }
545
+ },
546
+ 'openWindow': {
547
+ 'title': 'Open Window',
548
+ 'type': 'object',
549
+ 'properties': {
550
+ 'opened': {
551
+ 'title': 'Window Opened',
552
+ 'type': 'string',
553
+ 'description': 'Message if window is opened. (Hint: @ will be replaced with accessory name)'
554
+ },
555
+ 'closed': {
556
+ 'title': 'Window Closed',
557
+ 'type': 'string',
558
+ 'description': 'Message if window is closed. (Hint: @ will be replaced with accessory name)'
559
+ }
560
+ }
561
+ }
562
+ }
563
+ }
564
+ }
565
+ }
566
+ }
567
+ }
568
+ },
569
+ 'layout': [
570
+ 'name',
571
+ 'debug',
572
+ 'homes.name',
573
+ 'homes.polling',
574
+ 'homes.temperatureUnit',
575
+ {
576
+ 'key': 'homes',
577
+ 'title': 'Credentials',
578
+ 'type': 'section',
579
+ 'expandable': true,
580
+ 'expanded': false,
581
+ 'orderable': false,
582
+ 'items': [
583
+ 'homes.id',
584
+ 'homes.username',
585
+ 'homes.password'
586
+ ]
587
+ },
588
+ {
589
+ 'key': 'homes.zones',
590
+ 'type': 'section',
591
+ 'title': 'Zones',
592
+ 'expandable': true,
593
+ 'expanded': false,
594
+ 'orderable': false,
595
+ 'buttonText': 'Add Zone',
596
+ 'items': [
597
+ {
598
+ 'key': 'homes.zones[]',
599
+ 'items': [
600
+ {
601
+ 'title': 'Zone',
602
+ 'orderable': false,
603
+ 'items': [
604
+ 'homes.zones[].active',
605
+ 'homes.zones[].name',
606
+ 'homes.zones[].type',
607
+ 'homes.zones[].mode',
608
+ 'homes.zones[].modeTimer'
609
+ ]
610
+ },
611
+ {
612
+ 'title': 'Options',
613
+ 'expandable': true,
614
+ 'expanded': false,
615
+ 'orderable': false,
616
+ 'condition': {
617
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].active } catch(e) { return false };'
618
+ },
619
+ 'items': [
620
+ 'homes.zones[].id',
621
+ 'homes.zones[].easyMode',
622
+ 'homes.zones[].noBattery',
623
+ {
624
+ 'title': 'Temperature',
625
+ 'orderable': false,
626
+ 'expandable': true,
627
+ 'expanded': false,
628
+ 'type': 'section',
629
+ 'items': [
630
+ 'homes.zones[].minValue',
631
+ 'homes.zones[].maxValue',
632
+ 'homes.zones[].minStep'
633
+ ]
634
+ },
635
+ {
636
+ 'title': 'Hot Water',
637
+ 'orderable': false,
638
+ 'expandable': true,
639
+ 'expanded': false,
640
+ 'type': 'section',
641
+ 'condition': {
642
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].type === \'HOT_WATER\' } catch(e){ return false }'
643
+ },
644
+ 'items': [
645
+ 'homes.zones[].boilerTempSupport',
646
+ 'homes.zones[].accTypeBoiler'
647
+ ]
648
+ },
649
+ {
650
+ 'title': 'Open Window',
651
+ 'orderable': false,
652
+ 'expandable': true,
653
+ 'expanded': false,
654
+ 'type': 'section',
655
+ 'condition': {
656
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].type === \'HEATING\' } catch(e){ return false }'
657
+ },
658
+ 'items': [
659
+ 'homes.zones[].openWindowSensor',
660
+ 'homes.zones[].openWindowSwitch'
661
+ ]
662
+ },
663
+ {
664
+ 'title': 'Sensors',
665
+ 'orderable': false,
666
+ 'expandable': true,
667
+ 'expanded': false,
668
+ 'type': 'section',
669
+ 'items': [
670
+ 'homes.zones[].airQuality',
671
+ 'homes.zones[].separateTemperature',
672
+ 'homes.zones[].separateHumidity'
673
+ ]
674
+ },
675
+ {
676
+ 'title': 'Delay',
677
+ 'orderable': false,
678
+ 'expandable': true,
679
+ 'expanded': false,
680
+ 'type': 'section',
681
+ 'condition': {
682
+ 'functionBody': 'try { return model.homes.zones[arrayIndices[0]].type === \'HEATING\' } catch(e){ return false }'
683
+ },
684
+ 'items': [
685
+ 'homes.zones[].delaySwitch',
686
+ 'homes.zones[].autoOffDelay'
687
+ ]
688
+ }
689
+ ]
690
+ }
691
+ ]
692
+ }
693
+ ]
694
+ },
695
+ {
696
+ 'key': 'homes',
697
+ 'type': 'section',
698
+ 'title': 'Presence',
699
+ 'expandable': true,
700
+ 'expanded': false,
701
+ 'orderable': false,
702
+ 'items': [
703
+ {
704
+ 'title': 'Anyone',
705
+ 'orderable': false,
706
+ 'items': [
707
+ 'homes.presence.anyone',
708
+ 'homes.presence.accTypeAnyone'
709
+ ]
710
+ },
711
+ {
712
+ 'key': 'homes.presence.user',
713
+ 'title': 'User',
714
+ 'expandable': true,
715
+ 'expanded': false,
716
+ 'orderable': false,
717
+ 'buttonText': 'Add User',
718
+ 'items': [
719
+ {
720
+ 'key': 'homes.presence.user[]',
721
+ 'items': [
722
+ 'homes.presence.user[].active',
723
+ 'homes.presence.user[].name',
724
+ 'homes.presence.user[].accType'
725
+ ]
726
+ }
727
+ ]
728
+ }
729
+ ]
730
+ },
731
+ {
732
+ 'key': 'homes',
733
+ 'type': 'section',
734
+ 'title': 'Weather',
735
+ 'expandable': true,
736
+ 'expanded': false,
737
+ 'orderable': false,
738
+ 'items': [
739
+ 'homes.weather.temperatureSensor',
740
+ 'homes.weather.solarIntensity',
741
+ 'homes.weather.accTypeSolarIntensity',
742
+ 'homes.weather.airQuality',
743
+ {
744
+ 'title': 'Location',
745
+ 'condition': {
746
+ 'functionBody': 'try { return model.homes.weather.airQuality } catch(e) { return false };'
747
+ },
748
+ 'orderable': false,
749
+ 'items': [
750
+ 'homes.geolocation.longitude',
751
+ 'homes.geolocation.latitude'
752
+ ]
753
+ }
754
+ ]
755
+ },
756
+ {
757
+ 'key': 'homes',
758
+ 'type': 'section',
759
+ 'title': 'Extras',
760
+ 'expandable': true,
761
+ 'expanded': false,
762
+ 'orderable': false,
763
+ 'items': [
764
+ {
765
+ 'title': 'Central Switch',
766
+ 'type': 'section',
767
+ 'expandable': true,
768
+ 'expanded': false,
769
+ 'orderable': false,
770
+ 'items': [
771
+ 'homes.extras.centralSwitch',
772
+ 'homes.extras.runningInformation',
773
+ 'homes.extras.boostSwitch',
774
+ 'homes.extras.sheduleSwitch',
775
+ 'homes.extras.turnoffSwitch',
776
+ 'homes.extras.dummySwitch'
777
+ ]
778
+ },
779
+ {
780
+ 'title': 'Presence Lock',
781
+ 'type': 'section',
782
+ 'expandable': true,
783
+ 'expanded': false,
784
+ 'orderable': false,
785
+ 'items': [
786
+ 'homes.extras.presenceLock',
787
+ 'homes.extras.accTypePresenceLock'
788
+ ]
789
+ },
790
+ {
791
+ 'key': 'homes.extras.childLockSwitches',
792
+ 'title': 'Child Lock',
793
+ 'buttonText': 'Add Switch',
794
+ 'type': 'section',
795
+ 'expandable': true,
796
+ 'expanded': false,
797
+ 'orderable': false,
798
+ 'items': [
799
+ 'homes.extras.childLockSwitches[].active',
800
+ 'homes.extras.childLockSwitches[].name',
801
+ 'homes.extras.childLockSwitches[].serialNumber'
802
+ ]
803
+ }
804
+ ]
805
+ },
806
+ {
807
+ 'key': 'homes',
808
+ 'title': 'Telegram',
809
+ 'type': 'section',
810
+ 'orderable': false,
811
+ 'expandable': true,
812
+ 'expanded': false,
813
+ 'items': [
814
+ 'homes.telegram.active',
815
+ {
816
+ 'title': 'Credentials',
817
+ 'condition': {
818
+ 'functionBody': 'try { return model.homes.telegram.active } catch(e) { return false };'
819
+ },
820
+ 'orderable': false,
821
+ 'items': [
822
+ 'homes.telegram.token',
823
+ 'homes.telegram.chatID'
824
+ ]
825
+ },
826
+ {
827
+ 'title': 'Messages',
828
+ 'condition': {
829
+ 'functionBody': 'try { return model.homes.telegram.active } catch(e) { return false };'
830
+ },
831
+ 'orderable': false,
832
+ 'items': [
833
+ {
834
+ 'key': 'homes.telegram',
835
+ 'type': 'section',
836
+ 'title': 'Presence',
837
+ 'expandable': true,
838
+ 'expanded': false,
839
+ 'orderable': false,
840
+ 'items': [
841
+ 'homes.telegram.messages.presence.user_in',
842
+ 'homes.telegram.messages.presence.user_out',
843
+ 'homes.telegram.messages.presence.anyone_in',
844
+ 'homes.telegram.messages.presence.anyone_out'
845
+ ]
846
+ },
847
+ {
848
+ 'key': 'homes.telegram',
849
+ 'type': 'section',
850
+ 'title': 'Open Window',
851
+ 'expandable': true,
852
+ 'expanded': false,
853
+ 'orderable': false,
854
+ 'items': [
855
+ 'homes.telegram.messages.openWindow.opened',
856
+ 'homes.telegram.messages.openWindow.closed'
857
+ ]
858
+ }
859
+ ]
860
+ }
861
+ ]
862
+ }
863
+ ]
864
+ };