generated from homebridge/homebridge-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
config.schema.json
398 lines (398 loc) · 11.1 KB
/
config.schema.json
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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
{
"pluginAlias": "LGThinQ",
"pluginType": "platform",
"singular": true,
"customUi": true,
"schema": {
"auth_mode": {
"title": "Auth Mode",
"type": "string",
"default": "account",
"oneOf": [
{
"title": "LG Account",
"enum": [
"account"
]
},
{
"title": "Token",
"enum": [
"token"
]
}
]
},
"username": {
"title": "Username",
"type": "string",
"condition": {
"functionBody": "return model.auth_mode === 'account';"
}
},
"password": {
"title": "Password",
"type": "string",
"condition": {
"functionBody": "return model.auth_mode === 'account';"
}
},
"refresh_token": {
"title": "Refresh Token",
"type": "string",
"condition": {
"functionBody": "return model.auth_mode === 'token';"
}
},
"country": {
"title": "Country",
"type": "string",
"default": "US",
"required": true
},
"language": {
"title": "Language",
"type": "string",
"default": "en-US",
"required": true
},
"thinq1": {
"title": "Enable ThinQ1 Support?",
"type": "boolean",
"default": false
},
"refresh_interval": {
"title": "Refresh interval (in second)",
"type": "number",
"default": 60,
"condition": {
"functionBody": "return !!model.thinq1;"
}
},
"devices": {
"title": "Devices",
"description": "leave it empty to enable all device in account",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"title": "Device ID",
"type": "string",
"required": true
},
"name": {
"title": "Device Name",
"type": "string"
},
"type": {
"title": "Device Type",
"type": "string",
"enum": [
"AC",
"WASHER",
"WASHER_NEW",
"WASH_TOWER",
"DRYER",
"REFRIGERATOR",
"DISHWASHER",
"AIR_PURIFIER",
"DEHUMIDIFIER",
"AERO_TOWER",
"OVEN",
"RANGE",
"COOKTOP"
],
"condition": {
"functionBody": "return false;"
}
},
"serial_number": {
"title": "Serial Number (optional)",
"type": "string"
},
"dishwasher_trigger": {
"title": "Enable program finished trigger?",
"type": "boolean"
},
"washer_tub_clean": {
"title": "Enable Tub Clean Event",
"type": "boolean"
},
"washer_trigger": {
"title": "Enable program finished trigger?",
"type": "boolean"
},
"washer_door_lock": {
"title": "Enable door lock status",
"type": "boolean"
},
"ac_air_quality": {
"title": "Enable Air Quality",
"description": "if your device supported Air Quality sensor",
"type": "boolean"
},
"ac_mode": {
"title": "AC Mode (Heating or Cooling or Both)",
"type": "string",
"oneOf": [
{
"title": "Both Heating and Cooling mode",
"enum": [
"BOTH"
]
},
{
"title": "Cooling mode only",
"enum": [
"COOLING"
]
},
{
"title": "Heating mode only",
"enum": [
"HEATING"
]
}
]
},
"ac_swing_mode": {
"title": "Swing Mode (vertical or horizontal)",
"type": "string",
"oneOf": [
{
"title": "Both vertical and horizontal swing",
"enum": [
"BOTH"
]
},
{
"title": "Vertical swing only",
"enum": [
"VERTICAL"
]
},
{
"title": "Horizontal swing only",
"enum": [
"HORIZONTAL"
]
}
]
},
"ac_temperature_sensor": {
"title": "Current temperature as sensor",
"type": "boolean"
},
"ac_humidity_sensor": {
"title": "Enable humidity sensor",
"type": "boolean"
},
"ac_led_control": {
"title": "Enable led panel control",
"type": "boolean"
},
"ac_fan_control": {
"title": "Enable separate fan control",
"type": "boolean"
},
"ac_jet_control": {
"title": "Enable separate jet control",
"type": "boolean"
},
"ac_buttons": {
"title": "Customize AC buttons",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"op_mode": {
"type": "integer"
}
}
}
},
"ac_energy_save": {
"title": "Energy save as switch",
"type": "boolean",
"default": true
},
"ac_air_clean": {
"title": "Air purify as switch",
"type": "boolean",
"default": true
},
"ac_temperature_unit": {
"title": "Temperature Unit",
"type": "string",
"oneOf": [
{
"title": "Celsius",
"enum": [
"C"
]
},
{
"title": "Fahrenheit",
"enum": [
"F"
]
}
]
},
"ref_express_freezer": {
"title": "Express Freezer / Ice Plus",
"type": "boolean"
},
"ref_express_fridge": {
"title": "Express Fridge",
"type": "boolean"
},
"ref_eco_friendly": {
"title": "Eco Friendly",
"type": "boolean"
},
"air_fast_mode": {
"title": "Air Fast Mode",
"type": "boolean"
}
}
}
}
},
"layout": [
"auth_mode",
{
"type": "flex",
"flex-flow": "row wrap",
"items": [
"username",
{
"key": "password",
"type": "password"
}
]
},
"refresh_token",
{
"type": "flex",
"flex-flow": "row wrap",
"items": [
"country",
"language"
]
},
"thinq1",
"refresh_interval",
{
"key": "devices",
"type": "tabarray",
"title": "{{ value.name || 'new device' }}",
"items": [
"devices[].name",
"devices[].id",
"devices[].type",
"devices[].serial_number",
{
"key": "devices[]",
"type": "fieldset",
"title": "{{ value.title }}",
"items": [
{
"type": "fieldset",
"title": "Air purifier specific settings",
"description": "Configure air purifier device settings.",
"expandable": true,
"expanded": false,
"items": [
"devices[].air_fast_mode"
],
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['AIR_PURIFIER'].includes(model.devices[arrayIndices].type);"
}
},
{
"type": "fieldset",
"title": "Washer / Dryer specific settings",
"description": "Configure washer/dryer device settings.",
"expandable": true,
"expanded": false,
"items": [
"devices[].washer_trigger",
"devices[].washer_tub_clean",
"devices[].washer_door_lock"
],
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['WASHER','WASHER_NEW', 'WASH_TOWER', 'DRYER', 'WASH_TOWER_2'].includes(model.devices[arrayIndices].type);"
}
},
{
"type": "fieldset",
"title": "Air conditioner specific settings",
"description": "Configure AC device settings.",
"expandable": true,
"expanded": false,
"items": [
"devices[].ac_air_quality",
"devices[].ac_mode",
"devices[].ac_swing_mode",
"devices[].ac_temperature_sensor",
"devices[].ac_humidity_sensor",
"devices[].ac_fan_control",
"devices[].ac_jet_control",
"devices[].ac_energy_save",
"devices[].ac_air_clean",
"devices[].ac_temperature_unit",
{
"key": "devices[].ac_buttons",
"title": "AC buttons",
"description": "Configure AC buttons. For details check README.",
"type": "array",
"buttonText": "Add button",
"items": [
"devices[].ac_buttons[].name",
"devices[].ac_buttons[].op_mode"
]
}
],
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['AC'].includes(model.devices[arrayIndices].type);"
}
},
{
"type": "fieldset",
"title": "Refrigerator specific settings",
"description": "Configure refrigerator device settings.",
"expandable": true,
"expanded": false,
"items": [
"devices[].ref_express_freezer",
"devices[].ref_express_fridge",
"devices[].ref_eco_friendly"
],
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['REFRIGERATOR'].includes(model.devices[arrayIndices].type);"
}
},
{
"type": "fieldset",
"title": "Dishwasher specific settings",
"description": "Configure dishwasher device settings.",
"expandable": true,
"expanded": false,
"items": [
"devices[].dishwasher_trigger"
],
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['DISHWASHER'].includes(model.devices[arrayIndices].type);"
}
}
]
}
]
}
]
}