@homebridge-plugins/homebridge-tuya 3.0.0-beta.8 → 3.0.0-beta.9
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.
- package/ADVANCED_OPTIONS.md +17 -0
- package/README.md +3 -1
- package/config.schema.json +287 -517
- package/dist/cloud/device/TuyaCloudDeviceManager.js +3 -1
- package/dist/cloud/device/TuyaCloudDeviceManager.js.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/local/LocalDeviceManager.js +52 -8
- package/dist/local/LocalDeviceManager.js.map +1 -1
- package/dist/shared/TuyaDeviceManager.js +14 -3
- package/dist/shared/TuyaDeviceManager.js.map +1 -1
- package/dist/shared/TuyaHybridDeviceManager.js.map +1 -1
- package/dist/shared/accessory/GarageDoorAccessory.js +19 -2
- package/dist/shared/accessory/GarageDoorAccessory.js.map +1 -1
- package/dist/shared/util/ConfigMigrator.js +13 -2
- package/dist/shared/util/ConfigMigrator.js.map +1 -1
- package/package.json +4 -4
- package/test/ConfigMigrator.test.ts +169 -4
package/config.schema.json
CHANGED
|
@@ -6,247 +6,224 @@
|
|
|
6
6
|
"footerDisplay": "",
|
|
7
7
|
"customUi": false,
|
|
8
8
|
"layout": [
|
|
9
|
-
"mode",
|
|
10
9
|
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
"type": "radiobuttons",
|
|
11
|
+
"key": "mode",
|
|
12
|
+
"style": { "selected": "btn-secondary", "unselected": "btn-outline-secondary" }
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "fieldset",
|
|
16
|
+
"items": [
|
|
16
17
|
{
|
|
17
|
-
"type": "
|
|
18
|
-
"
|
|
19
|
-
"notitle": true,
|
|
20
|
-
"items": [
|
|
21
|
-
{
|
|
22
|
-
"type": "help",
|
|
23
|
-
"helpvalue": "⚠These settings are currently inactive because Cloud mode is enabled.",
|
|
24
|
-
"condition": { "functionBody": "return (model.mode === 'cloud')" }
|
|
25
|
-
},
|
|
26
|
-
"local.autoDiscoverDevices",
|
|
27
|
-
"local.discoverTimeout",
|
|
28
|
-
"local.rediscoverInterval",
|
|
18
|
+
"type": "tabs",
|
|
19
|
+
"tabs": [
|
|
29
20
|
{
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"title": "{{ 'Add New Device' }}",
|
|
33
|
-
"type": "tabarray",
|
|
21
|
+
"type": "fieldset",
|
|
22
|
+
"title": "Local Settings",
|
|
34
23
|
"notitle": true,
|
|
35
24
|
"items": [
|
|
36
25
|
{
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
"type": "help",
|
|
27
|
+
"labelHtmlClass": "alert-link alert-warning",
|
|
28
|
+
"helpvalue": "⚠These settings are currently inactive because Cloud mode is enabled.",
|
|
29
|
+
"condition": { "functionBody": "return (model.mode === 'cloud')" }
|
|
30
|
+
},
|
|
31
|
+
"local.autoDiscoverDevices",
|
|
32
|
+
"local.discoverTimeout",
|
|
33
|
+
"local.rediscoverInterval",
|
|
34
|
+
{
|
|
35
|
+
"key": "local.devices",
|
|
36
|
+
"add": "Add Manual Device",
|
|
37
|
+
"title": "{{ 'Add New Device' }}",
|
|
38
|
+
"type": "tabarray",
|
|
39
39
|
"notitle": true,
|
|
40
|
-
"title": "{{ value.name || value.tuyaDeviceId || 'New Device' }}",
|
|
41
40
|
"items": [
|
|
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
|
-
|
|
41
|
+
{
|
|
42
|
+
"type": "div",
|
|
43
|
+
"displayFlex": false,
|
|
44
|
+
"notitle": true,
|
|
45
|
+
"title": "{{ value.name || value.tuyaDeviceId || 'New Device' }}",
|
|
46
|
+
"items": [
|
|
47
|
+
"local.devices[].category",
|
|
48
|
+
"local.devices[].name",
|
|
49
|
+
"local.devices[].tuyaDeviceId",
|
|
50
|
+
"local.devices[].tuyaKey",
|
|
51
|
+
"local.devices[].ip",
|
|
52
|
+
"local.devices[].protocolVersion",
|
|
53
|
+
"local.devices[].dpMapping",
|
|
54
|
+
"local.devices[].outletCount",
|
|
55
|
+
"local.devices[].outlets",
|
|
56
|
+
"local.devices[].dpPower",
|
|
57
|
+
"local.devices[].dpBrightness",
|
|
58
|
+
"local.devices[].dpColorTemperature",
|
|
59
|
+
"local.devices[].minWhiteColor",
|
|
60
|
+
"local.devices[].maxWhiteColor",
|
|
61
|
+
"local.devices[].dpMode",
|
|
62
|
+
"local.devices[].dpColor",
|
|
63
|
+
"local.devices[].colorFunction",
|
|
64
|
+
"local.devices[].scaleBrightness",
|
|
65
|
+
"local.devices[].scaleWhiteColor",
|
|
66
|
+
"local.devices[].voltsId",
|
|
67
|
+
"local.devices[].ampsId",
|
|
68
|
+
"local.devices[].wattsId",
|
|
69
|
+
"local.devices[].voltsDivisor",
|
|
70
|
+
"local.devices[].ampsDivisor",
|
|
71
|
+
"local.devices[].wattsDivisor",
|
|
72
|
+
"local.devices[].noCool",
|
|
73
|
+
"local.devices[].noHeat",
|
|
74
|
+
"local.devices[].cmdCool",
|
|
75
|
+
"local.devices[].cmdHeat",
|
|
76
|
+
"local.devices[].noSwing",
|
|
77
|
+
"local.devices[].minTemperature",
|
|
78
|
+
"local.devices[].maxTemperature",
|
|
79
|
+
"local.devices[].minTemperatureSteps",
|
|
80
|
+
"local.devices[].dpActive",
|
|
81
|
+
"local.devices[].dpDesiredTemperature",
|
|
82
|
+
"local.devices[].dpCurrentTemperature",
|
|
83
|
+
"local.devices[].dpAction",
|
|
84
|
+
"local.devices[].dpStatus",
|
|
85
|
+
"local.devices[].flipState",
|
|
86
|
+
"local.devices[].timeToOpen",
|
|
87
|
+
"local.devices[].timeToTighten",
|
|
88
|
+
"local.devices[].timeToClose",
|
|
89
|
+
"local.devices[].dpLight",
|
|
90
|
+
"local.devices[].dpBlindType",
|
|
91
|
+
"local.devices[].dpLightOn",
|
|
92
|
+
"local.devices[].dpFanOn",
|
|
93
|
+
"local.devices[].dpRotationSpeed",
|
|
94
|
+
"local.devices[].dpRotationDirection",
|
|
95
|
+
"local.devices[].maxSpeed",
|
|
96
|
+
"local.devices[].fanDefaultSpeed",
|
|
97
|
+
"local.devices[].useStrings",
|
|
98
|
+
"local.devices[].dpChildLock",
|
|
99
|
+
"local.devices[].dpTemperatureDisplayUnits",
|
|
100
|
+
"local.devices[].cmdLow",
|
|
101
|
+
"local.devices[].cmdHigh",
|
|
102
|
+
"local.devices[].noChildLock",
|
|
103
|
+
"local.devices[].noTemperatureUnit",
|
|
104
|
+
"local.devices[].temperatureDivisor",
|
|
105
|
+
"local.devices[].thresholdTemperatureDivisor",
|
|
106
|
+
"local.devices[].temperatureOffset"
|
|
107
|
+
]
|
|
108
|
+
}
|
|
102
109
|
]
|
|
103
110
|
}
|
|
104
111
|
]
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"type": "fieldset",
|
|
110
|
-
"title": "Cloud Settings",
|
|
111
|
-
"notitle": true,
|
|
112
|
-
"items": [
|
|
113
|
-
{
|
|
114
|
-
"type": "help",
|
|
115
|
-
"helpvalue": "⚠These settings are currently inactive because Local mode is enabled.",
|
|
116
|
-
"condition": { "functionBody": "return (model.mode === 'local')" }
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"type": "fieldset",
|
|
120
|
-
"title": "Tuya Cloud Account Info",
|
|
121
|
-
"expandable": true,
|
|
122
|
-
"expanded": false,
|
|
123
|
-
"items": [
|
|
124
|
-
"options.projectType",
|
|
125
|
-
"options.endpoint",
|
|
126
|
-
"options.accessId",
|
|
127
|
-
"options.accessKey",
|
|
128
|
-
"options.countryCode",
|
|
129
|
-
"options.username",
|
|
130
|
-
"options.password",
|
|
131
|
-
"options.appSchema"
|
|
132
|
-
]
|
|
133
112
|
},
|
|
134
113
|
{
|
|
135
114
|
"type": "fieldset",
|
|
136
|
-
"title": "
|
|
137
|
-
"
|
|
138
|
-
"expanded": false,
|
|
139
|
-
"notitle": false,
|
|
115
|
+
"title": "Cloud Settings",
|
|
116
|
+
"notitle": true,
|
|
140
117
|
"items": [
|
|
141
118
|
{
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
|
|
119
|
+
"type": "help",
|
|
120
|
+
"labelHtmlClass": "alert-link alert-warning",
|
|
121
|
+
"helpvalue": "⚠These settings are currently inactive because Local mode is enabled.",
|
|
122
|
+
"condition": { "functionBody": "return (model.mode === 'local')" }
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "fieldset",
|
|
126
|
+
"title": "Tuya Cloud Account Info",
|
|
127
|
+
"expandable": true,
|
|
128
|
+
"expanded": true,
|
|
129
|
+
"items": [
|
|
130
|
+
"options.projectType",
|
|
131
|
+
"options.endpoint",
|
|
132
|
+
"options.accessId",
|
|
133
|
+
"options.accessKey",
|
|
134
|
+
"options.countryCode",
|
|
135
|
+
"options.username",
|
|
136
|
+
"options.password",
|
|
137
|
+
"options.appSchema"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "fieldset",
|
|
142
|
+
"title": "Tuya Home Settings",
|
|
143
|
+
"expandable": true,
|
|
144
|
+
"expanded": false,
|
|
147
145
|
"items": [
|
|
148
146
|
{
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"notitle": true,
|
|
153
|
-
"title": "{{ value }}",
|
|
147
|
+
"key": "options.homeWhitelist",
|
|
148
|
+
"add": "Add Another Home ID",
|
|
149
|
+
"type": "tabarray",
|
|
154
150
|
"items": [
|
|
155
151
|
{
|
|
156
|
-
"
|
|
157
|
-
"
|
|
152
|
+
"type": "div",
|
|
153
|
+
"title": "{{ value }}",
|
|
154
|
+
"items": [ "options.homeWhitelist[]" ]
|
|
158
155
|
}
|
|
159
156
|
]
|
|
160
157
|
}
|
|
161
158
|
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "fieldset",
|
|
162
|
+
"title": "Advance Settings",
|
|
163
|
+
"expandable": true,
|
|
164
|
+
"expanded": false,
|
|
165
|
+
"items": [
|
|
166
|
+
"options.generateWeatherAccessory",
|
|
167
|
+
"options.weatherAPI",
|
|
168
|
+
"options.forceIPv4"
|
|
169
|
+
]
|
|
162
170
|
}
|
|
163
171
|
]
|
|
164
172
|
},
|
|
165
173
|
{
|
|
166
174
|
"type": "fieldset",
|
|
167
|
-
"title": "
|
|
168
|
-
"
|
|
169
|
-
"expanded": true,
|
|
170
|
-
"notitle": false,
|
|
175
|
+
"title": "Common Settings",
|
|
176
|
+
"notitle": true,
|
|
171
177
|
"items": [
|
|
172
178
|
{
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"notitle": true,
|
|
178
|
-
"default": [],
|
|
179
|
+
"type": "fieldset",
|
|
180
|
+
"title": "Tuya Device Settings",
|
|
181
|
+
"expandable": true,
|
|
182
|
+
"expanded": true,
|
|
179
183
|
"items": [
|
|
180
184
|
{
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"flex-direction": "row",
|
|
184
|
-
"notitle": true,
|
|
185
|
+
"key": "options.deviceOverrides",
|
|
186
|
+
"add": "Add Another Device Override",
|
|
185
187
|
"title": "{{ value.id || 'New Device Override' }}",
|
|
188
|
+
"type": "tabarray",
|
|
189
|
+
"default": [],
|
|
186
190
|
"items": [
|
|
187
191
|
{
|
|
188
|
-
"
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"key": "options.deviceOverrides[].category"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"key": "options.deviceOverrides[].unbridged"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"key": "options.deviceOverrides[].configFor"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"key": "options.deviceOverrides[].schema",
|
|
201
|
-
"add": "Add New Schema",
|
|
202
|
-
"title": "{{ 'New Schema' }}",
|
|
203
|
-
"type": "tabarray",
|
|
204
|
-
"notitle": true,
|
|
192
|
+
"type": "div",
|
|
205
193
|
"items": [
|
|
194
|
+
"options.deviceOverrides[].id",
|
|
195
|
+
"options.deviceOverrides[].category",
|
|
196
|
+
"options.deviceOverrides[].unbridged",
|
|
197
|
+
"options.deviceOverrides[].configFor",
|
|
206
198
|
{
|
|
207
|
-
"
|
|
208
|
-
"
|
|
199
|
+
"key": "options.deviceOverrides[].schema",
|
|
200
|
+
"add": "Add New Schema",
|
|
209
201
|
"title": "{{ value.code }}",
|
|
210
|
-
"
|
|
211
|
-
"notitle": false,
|
|
202
|
+
"type": "tabarray",
|
|
212
203
|
"items": [
|
|
213
204
|
{
|
|
214
|
-
"
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"key": "options.deviceOverrides[].schema[].newCode"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"key": "options.deviceOverrides[].schema[].hidden"
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"key": "options.deviceOverrides[].schema[].type"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"key": "options.deviceOverrides[].schema[].property",
|
|
227
|
-
"notitle": false,
|
|
205
|
+
"type": "div",
|
|
228
206
|
"items": [
|
|
229
|
-
"options.deviceOverrides[].schema[].
|
|
230
|
-
"options.deviceOverrides[].schema[].
|
|
231
|
-
"options.deviceOverrides[].schema[].
|
|
232
|
-
"options.deviceOverrides[].schema[].
|
|
207
|
+
"options.deviceOverrides[].schema[].code",
|
|
208
|
+
"options.deviceOverrides[].schema[].newCode",
|
|
209
|
+
"options.deviceOverrides[].schema[].hidden",
|
|
210
|
+
"options.deviceOverrides[].schema[].type",
|
|
233
211
|
{
|
|
234
|
-
"key": "options.deviceOverrides[].schema[].property
|
|
235
|
-
"add": "Add Range",
|
|
236
|
-
"title": "{{ 'New Range' }}",
|
|
237
|
-
"type": "tabarray",
|
|
238
|
-
"notitle": true,
|
|
212
|
+
"key": "options.deviceOverrides[].schema[].property",
|
|
239
213
|
"items": [
|
|
214
|
+
"options.deviceOverrides[].schema[].property.min",
|
|
215
|
+
"options.deviceOverrides[].schema[].property.max",
|
|
216
|
+
"options.deviceOverrides[].schema[].property.scale",
|
|
217
|
+
"options.deviceOverrides[].schema[].property.step",
|
|
240
218
|
{
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
"flex-direction": "row",
|
|
244
|
-
"notitle": true,
|
|
219
|
+
"key": "options.deviceOverrides[].schema[].property.range",
|
|
220
|
+
"add": "Add Range",
|
|
245
221
|
"title": "{{ value }}",
|
|
222
|
+
"type": "tabarray",
|
|
246
223
|
"items": [
|
|
247
224
|
{
|
|
248
|
-
"
|
|
249
|
-
"
|
|
225
|
+
"type": "div",
|
|
226
|
+
"items": [ "options.deviceOverrides[].schema[].property.range[]" ]
|
|
250
227
|
}
|
|
251
228
|
]
|
|
252
229
|
}
|
|
@@ -261,93 +238,55 @@
|
|
|
261
238
|
]
|
|
262
239
|
}
|
|
263
240
|
]
|
|
264
|
-
}
|
|
265
|
-
]
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
{
|
|
269
|
-
"type": "fieldset",
|
|
270
|
-
"title": "Accessory Service Informations",
|
|
271
|
-
"expandable": true,
|
|
272
|
-
"expanded": false,
|
|
273
|
-
"notitle": false,
|
|
274
|
-
"items": [
|
|
241
|
+
},
|
|
275
242
|
{
|
|
276
|
-
"
|
|
277
|
-
"
|
|
278
|
-
"
|
|
279
|
-
"
|
|
280
|
-
"notitle":
|
|
281
|
-
"default": [],
|
|
243
|
+
"type": "fieldset",
|
|
244
|
+
"title": "Accessory Service Informations",
|
|
245
|
+
"expandable": true,
|
|
246
|
+
"expanded": false,
|
|
247
|
+
"notitle": false,
|
|
282
248
|
"items": [
|
|
283
249
|
{
|
|
284
|
-
"
|
|
285
|
-
"
|
|
286
|
-
"
|
|
287
|
-
"
|
|
288
|
-
"
|
|
250
|
+
"key": "options.serviceInformationOverrides",
|
|
251
|
+
"add": "Add Another Service Information Override",
|
|
252
|
+
"title": "{{ 'New Service Information Override' }}",
|
|
253
|
+
"type": "tabarray",
|
|
254
|
+
"default": [],
|
|
289
255
|
"items": [
|
|
290
256
|
{
|
|
291
|
-
"
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"key": "options.serviceInformationOverrides[].firmwareRevision"
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
"key": "options.serviceInformationOverrides[].configuredName"
|
|
257
|
+
"type": "div",
|
|
258
|
+
"title": "{{ value.configuredName || value.device_id }}",
|
|
259
|
+
"items": [
|
|
260
|
+
"options.serviceInformationOverrides[].device_id",
|
|
261
|
+
"options.serviceInformationOverrides[].index",
|
|
262
|
+
"options.serviceInformationOverrides[].manifacturer",
|
|
263
|
+
"options.serviceInformationOverrides[].model",
|
|
264
|
+
"options.serviceInformationOverrides[].firmwareRevision",
|
|
265
|
+
"options.serviceInformationOverrides[].configuredName"
|
|
266
|
+
]
|
|
307
267
|
}
|
|
308
268
|
]
|
|
309
269
|
}
|
|
310
270
|
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"type": "fieldset",
|
|
274
|
+
"title": "Debug Settings",
|
|
275
|
+
"expandable": true,
|
|
276
|
+
"expanded": false,
|
|
277
|
+
"notitle": false,
|
|
278
|
+
"items": [
|
|
279
|
+
"common.debug",
|
|
280
|
+
"common.debugLevel"
|
|
281
|
+
]
|
|
311
282
|
}
|
|
312
283
|
]
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
"type": "fieldset",
|
|
316
|
-
"title": "Advance Settings",
|
|
317
|
-
"expandable": true,
|
|
318
|
-
"expanded": false,
|
|
319
|
-
"notitle": false,
|
|
320
|
-
"items": [
|
|
321
|
-
"options.generateWeatherAccessory",
|
|
322
|
-
"options.weatherAPI",
|
|
323
|
-
"options.forceIPv4"
|
|
324
|
-
]
|
|
325
|
-
}
|
|
326
|
-
]
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
"type": "fieldset",
|
|
330
|
-
"title": "Common Settings",
|
|
331
|
-
"notitle": true,
|
|
332
|
-
"items": [
|
|
333
|
-
{
|
|
334
|
-
"type": "fieldset",
|
|
335
|
-
"title": "Debug Settings",
|
|
336
|
-
"expandable": true,
|
|
337
|
-
"expanded": true,
|
|
338
|
-
"notitle": false,
|
|
339
|
-
"items": [
|
|
340
|
-
"common.debug",
|
|
341
|
-
"common.debugLevel"
|
|
342
|
-
]
|
|
343
284
|
}
|
|
344
285
|
]
|
|
345
286
|
}
|
|
346
287
|
]
|
|
347
288
|
}
|
|
348
|
-
]
|
|
349
|
-
}
|
|
350
|
-
],
|
|
289
|
+
],
|
|
351
290
|
"schema": {
|
|
352
291
|
"type": "object",
|
|
353
292
|
"required": ["mode"],
|
|
@@ -402,6 +341,7 @@
|
|
|
402
341
|
"default": [],
|
|
403
342
|
"items": {
|
|
404
343
|
"type": "object",
|
|
344
|
+
"required": ["category"],
|
|
405
345
|
"properties": {
|
|
406
346
|
"category": {
|
|
407
347
|
"title": "Type",
|
|
@@ -444,41 +384,31 @@
|
|
|
444
384
|
"title": "Device ID",
|
|
445
385
|
"description": "The Tuya device ID (same as the cloud device ID).",
|
|
446
386
|
"type": "string",
|
|
447
|
-
"condition": {
|
|
448
|
-
"functionBody": "return model.local && model.local.devices && model.local.devices[arrayIndices[0]] && model.local.devices[arrayIndices[0]].category !== '';"
|
|
449
|
-
}
|
|
387
|
+
"condition": { "functionBody": "return !!model.local?.devices?.[arrayIndices[0]]?.category;" }
|
|
450
388
|
},
|
|
451
389
|
"tuyaKey": {
|
|
452
390
|
"title": "Local Key",
|
|
453
391
|
"description": "The 16-character AES local key for direct communication.",
|
|
454
392
|
"type": "string",
|
|
455
|
-
"condition": {
|
|
456
|
-
"functionBody": "return model.local && model.local.devices && model.local.devices[arrayIndices[0]] && model.local.devices[arrayIndices[0]].category !== '';"
|
|
457
|
-
}
|
|
393
|
+
"condition": { "functionBody": "return !!model.local?.devices?.[arrayIndices[0]]?.category;" }
|
|
458
394
|
},
|
|
459
395
|
"ip": {
|
|
460
396
|
"title": "IP Address",
|
|
461
397
|
"description": "Fixed IP address. Leave blank to use auto-discovery.",
|
|
462
398
|
"type": "string",
|
|
463
|
-
"condition": {
|
|
464
|
-
"functionBody": "return model.local && model.local.devices && model.local.devices[arrayIndices[0]] && model.local.devices[arrayIndices[0]].category !== '';"
|
|
465
|
-
}
|
|
399
|
+
"condition": { "functionBody": "return !!model.local?.devices?.[arrayIndices[0]]?.category;" }
|
|
466
400
|
},
|
|
467
401
|
"name": {
|
|
468
402
|
"title": "Name",
|
|
469
403
|
"description": "Anything you'd like to use to identify this device.",
|
|
470
404
|
"type": "string",
|
|
471
|
-
"condition": {
|
|
472
|
-
"functionBody": "return model.local && model.local.devices && model.local.devices[arrayIndices[0]] && model.local.devices[arrayIndices[0]].category !== '';"
|
|
473
|
-
}
|
|
405
|
+
"condition": { "functionBody": "return !!model.local?.devices?.[arrayIndices[0]]?.category;" }
|
|
474
406
|
},
|
|
475
407
|
"protocolVersion": {
|
|
476
408
|
"title": "Protocol Version",
|
|
477
409
|
"description": "Tuya local protocol version. Leave blank to auto-detect.",
|
|
478
410
|
"type": "string",
|
|
479
|
-
"condition": {
|
|
480
|
-
"functionBody": "return model.local && model.local.devices && model.local.devices[arrayIndices[0]] && model.local.devices[arrayIndices[0]].category !== '';"
|
|
481
|
-
}
|
|
411
|
+
"condition": { "functionBody": "return !!model.local?.devices?.[arrayIndices[0]]?.category;" }
|
|
482
412
|
},
|
|
483
413
|
"dpMapping": {
|
|
484
414
|
"title": "Custom DP Mapping (Advanced)",
|
|
@@ -495,9 +425,7 @@
|
|
|
495
425
|
"type": "integer",
|
|
496
426
|
"title": "Outlet Count",
|
|
497
427
|
"placeholder": 5,
|
|
498
|
-
"condition": {
|
|
499
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'pc' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'wkcz';"
|
|
500
|
-
}
|
|
428
|
+
"condition": { "functionBody": "return ['cz', 'pc', 'wkcz'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
501
429
|
},
|
|
502
430
|
"isZigbeeGateway": {
|
|
503
431
|
"title": "Zigbee Gateway",
|
|
@@ -551,411 +479,309 @@
|
|
|
551
479
|
}
|
|
552
480
|
},
|
|
553
481
|
"condition": {
|
|
554
|
-
"functionBody": "return
|
|
482
|
+
"functionBody": "return ['cz', 'pc', 'wkcz'].includes(model.local?.devices?.[arrayIndices[0]]?.category);"
|
|
555
483
|
}
|
|
556
484
|
},
|
|
557
485
|
"dpPower": {
|
|
558
486
|
"type": "integer",
|
|
559
487
|
"title": "Power DP",
|
|
560
488
|
"placeholder": 1,
|
|
561
|
-
"condition": {
|
|
562
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'pc' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'wkcz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg';"
|
|
563
|
-
}
|
|
489
|
+
"condition": { "functionBody": "return ['cz', 'pc', 'wkcz', 'dj', 'dsd', 'xdd', 'tgq', 'tgkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
564
490
|
},
|
|
565
491
|
"dpBrightness": {
|
|
566
492
|
"type": "integer",
|
|
567
493
|
"title": "Brightness DP",
|
|
568
494
|
"placeholder": 2,
|
|
569
|
-
"condition": {
|
|
570
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
571
|
-
}
|
|
495
|
+
"condition": { "functionBody": "return ['dj', 'dsd', 'xdd', 'tgq', 'tgkg', 'fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
572
496
|
},
|
|
573
497
|
"dpColorTemperature": {
|
|
574
498
|
"type": "integer",
|
|
575
499
|
"title": "Color Temperature DP",
|
|
576
500
|
"placeholder": 3,
|
|
577
|
-
"condition": {
|
|
578
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
579
|
-
}
|
|
501
|
+
"condition": { "functionBody": "return ['dj', 'dsd', 'xdd', 'tgq', 'tgkg', 'fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
580
502
|
},
|
|
581
503
|
"minWhiteColor": {
|
|
582
504
|
"type": "integer",
|
|
583
505
|
"title": "Min White Color",
|
|
584
506
|
"placeholder": 140,
|
|
585
|
-
"condition": {
|
|
586
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg';"
|
|
587
|
-
}
|
|
507
|
+
"condition": { "functionBody": "return ['dj', 'dsd', 'xdd', 'tgq', 'tgkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
588
508
|
},
|
|
589
509
|
"maxWhiteColor": {
|
|
590
510
|
"type": "integer",
|
|
591
511
|
"title": "Max White Color",
|
|
592
512
|
"placeholder": 400,
|
|
593
|
-
"condition": {
|
|
594
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg';"
|
|
595
|
-
}
|
|
513
|
+
"condition": { "functionBody": "return ['dj', 'dsd', 'xdd', 'tgq', 'tgkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
596
514
|
},
|
|
597
515
|
"dpMode": {
|
|
598
516
|
"type": "integer",
|
|
599
517
|
"title": "Mode DP",
|
|
600
518
|
"placeholder": 2,
|
|
601
|
-
"condition": {
|
|
602
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg';"
|
|
603
|
-
}
|
|
519
|
+
"condition": { "functionBody": "return ['dj', 'dsd', 'xdd', 'tgq', 'tgkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
604
520
|
},
|
|
605
521
|
"dpColor": {
|
|
606
522
|
"type": "integer",
|
|
607
523
|
"title": "Color DP",
|
|
608
524
|
"placeholder": 5,
|
|
609
|
-
"condition": {
|
|
610
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg';"
|
|
611
|
-
}
|
|
525
|
+
"condition": { "functionBody": "return ['dj', 'dsd', 'xdd', 'tgq', 'tgkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
612
526
|
},
|
|
613
527
|
"colorFunction": {
|
|
614
528
|
"type": "string",
|
|
615
529
|
"title": "Color Function",
|
|
616
530
|
"placeholder": "HEXHSB",
|
|
617
|
-
"condition": {
|
|
618
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg';"
|
|
619
|
-
}
|
|
531
|
+
"condition": { "functionBody": "return ['dj', 'dsd', 'xdd', 'tgq', 'tgkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
620
532
|
},
|
|
621
533
|
"scaleBrightness": {
|
|
622
534
|
"type": "integer",
|
|
623
535
|
"title": "Scale Brightness",
|
|
624
536
|
"placeholder": 255,
|
|
625
|
-
"condition": {
|
|
626
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
627
|
-
}
|
|
537
|
+
"condition": { "functionBody": "return ['dj', 'dsd', 'xdd', 'tgq', 'tgkg', 'fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
628
538
|
},
|
|
629
539
|
"scaleWhiteColor": {
|
|
630
540
|
"type": "integer",
|
|
631
541
|
"title": "Scale White Color",
|
|
632
542
|
"placeholder": 255,
|
|
633
|
-
"condition": {
|
|
634
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dj' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'dsd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'xdd' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'tgkg';"
|
|
635
|
-
}
|
|
543
|
+
"condition": { "functionBody": "return ['dj', 'dsd', 'xdd', 'tgq', 'tgkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
636
544
|
},
|
|
637
545
|
"voltsId": {
|
|
638
546
|
"type": "integer",
|
|
639
547
|
"title": "Voltage DP",
|
|
640
548
|
"placeholder": 9,
|
|
641
|
-
"condition": {
|
|
642
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'pc' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'wkcz';"
|
|
643
|
-
}
|
|
549
|
+
"condition": { "functionBody": "return ['cz', 'pc', 'wkcz'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
644
550
|
},
|
|
645
551
|
"ampsId": {
|
|
646
552
|
"type": "integer",
|
|
647
553
|
"title": "Amperage DP",
|
|
648
554
|
"placeholder": 8,
|
|
649
|
-
"condition": {
|
|
650
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'pc' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'wkcz';"
|
|
651
|
-
}
|
|
555
|
+
"condition": { "functionBody": "return ['cz', 'pc', 'wkcz'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
652
556
|
},
|
|
653
557
|
"wattsId": {
|
|
654
558
|
"type": "integer",
|
|
655
559
|
"title": "Power DP",
|
|
656
560
|
"placeholder": 7,
|
|
657
|
-
"condition": {
|
|
658
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'pc' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'wkcz';"
|
|
659
|
-
}
|
|
561
|
+
"condition": { "functionBody": "return ['cz', 'pc', 'wkcz'].includes(model.local?.devices?.[arrayIndices[0]]?.category);"}
|
|
660
562
|
},
|
|
661
563
|
"voltsDivisor": {
|
|
662
564
|
"type": "integer",
|
|
663
565
|
"title": "Voltage Divisor",
|
|
664
566
|
"placeholder": 10,
|
|
665
|
-
"condition": {
|
|
666
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'pc' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'wkcz';"
|
|
667
|
-
}
|
|
567
|
+
"condition": { "functionBody": "return ['cz', 'pc', 'wkcz'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
668
568
|
},
|
|
669
569
|
"ampsDivisor": {
|
|
670
570
|
"type": "integer",
|
|
671
571
|
"title": "Amperage Divisor",
|
|
672
572
|
"placeholder": 1000,
|
|
673
|
-
"condition": {
|
|
674
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'pc' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'wkcz';"
|
|
675
|
-
}
|
|
573
|
+
"condition": { "functionBody": "return ['cz', 'pc', 'wkcz'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
676
574
|
},
|
|
677
575
|
"wattsDivisor": {
|
|
678
576
|
"type": "integer",
|
|
679
577
|
"title": "Power Divisor",
|
|
680
578
|
"placeholder": 10,
|
|
681
|
-
"condition": {
|
|
682
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'pc' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'wkcz';"
|
|
683
|
-
}
|
|
579
|
+
"condition": { "functionBody": "return ['cz', 'pc', 'wkcz'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
684
580
|
},
|
|
685
581
|
"noCool": {
|
|
686
582
|
"type": "boolean",
|
|
687
583
|
"title": "No Cool Mode",
|
|
688
|
-
"condition": {
|
|
689
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'kt' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ktkzq';"
|
|
690
|
-
}
|
|
584
|
+
"condition": { "functionBody": "return ['kt', 'ktkzq'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
691
585
|
},
|
|
692
586
|
"noHeat": {
|
|
693
587
|
"type": "boolean",
|
|
694
588
|
"title": "No Heat Mode",
|
|
695
|
-
"condition": {
|
|
696
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'kt' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ktkzq';"
|
|
697
|
-
}
|
|
589
|
+
"condition": { "functionBody": "return ['kt', 'ktkzq'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
698
590
|
},
|
|
699
591
|
"cmdCool": {
|
|
700
592
|
"type": "string",
|
|
701
593
|
"title": "Cool Command",
|
|
702
594
|
"placeholder": "COOL",
|
|
703
|
-
"condition": {
|
|
704
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'kt' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ktkzq';"
|
|
705
|
-
}
|
|
595
|
+
"condition": { "functionBody": "return ['kt', 'ktkzq'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
706
596
|
},
|
|
707
597
|
"cmdHeat": {
|
|
708
598
|
"type": "string",
|
|
709
599
|
"title": "Heat Command",
|
|
710
600
|
"placeholder": "HEAT",
|
|
711
|
-
"condition": {
|
|
712
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'kt' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ktkzq';"
|
|
713
|
-
}
|
|
601
|
+
"condition": { "functionBody": "return ['kt', 'ktkzq'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
714
602
|
},
|
|
715
603
|
"noSwing": {
|
|
716
604
|
"type": "boolean",
|
|
717
605
|
"title": "No Swing Mode",
|
|
718
|
-
"condition": {
|
|
719
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'kt' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ktkzq';"
|
|
720
|
-
}
|
|
606
|
+
"condition": { "functionBody": "return ['kt', 'ktkzq'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
721
607
|
},
|
|
722
608
|
"minTemperature": {
|
|
723
609
|
"type": "integer",
|
|
724
610
|
"title": "Min Temperature",
|
|
725
611
|
"placeholder": 15,
|
|
726
|
-
"condition": {
|
|
727
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'kt' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ktkzq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
728
|
-
}
|
|
612
|
+
"condition": { "functionBody": "return ['kt', 'ktkzq', 'qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
729
613
|
},
|
|
730
614
|
"maxTemperature": {
|
|
731
615
|
"type": "integer",
|
|
732
616
|
"title": "Max Temperature",
|
|
733
617
|
"placeholder": 40,
|
|
734
|
-
"condition": {
|
|
735
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'kt' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ktkzq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
736
|
-
}
|
|
618
|
+
"condition": { "functionBody": "return ['kt', 'ktkzq', 'qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
737
619
|
},
|
|
738
620
|
"minTemperatureSteps": {
|
|
739
621
|
"type": "integer",
|
|
740
622
|
"title": "Min Temperature Steps",
|
|
741
623
|
"placeholder": 1,
|
|
742
|
-
"condition": {
|
|
743
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'kt' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ktkzq';"
|
|
744
|
-
}
|
|
624
|
+
"condition": { "functionBody": "return ['kt', 'ktkzq'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
745
625
|
},
|
|
746
626
|
"dpActive": {
|
|
747
627
|
"type": "integer",
|
|
748
628
|
"title": "Active DP",
|
|
749
629
|
"placeholder": 7,
|
|
750
|
-
"condition": {
|
|
751
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
752
|
-
}
|
|
630
|
+
"condition": { "functionBody": "return ['qn', 'fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
753
631
|
},
|
|
754
632
|
"dpDesiredTemperature": {
|
|
755
633
|
"type": "integer",
|
|
756
634
|
"title": "Desired Temperature DP",
|
|
757
635
|
"placeholder": 2,
|
|
758
|
-
"condition": {
|
|
759
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
760
|
-
}
|
|
636
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
761
637
|
},
|
|
762
638
|
"dpCurrentTemperature": {
|
|
763
639
|
"type": "integer",
|
|
764
640
|
"title": "Current Temperature DP",
|
|
765
641
|
"placeholder": 3,
|
|
766
|
-
"condition": {
|
|
767
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
768
|
-
}
|
|
642
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
769
643
|
},
|
|
770
644
|
"dpAction": {
|
|
771
645
|
"type": "integer",
|
|
772
646
|
"title": "Action DP",
|
|
773
647
|
"placeholder": 1,
|
|
774
|
-
"condition": {
|
|
775
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ckmkzq';"
|
|
776
|
-
}
|
|
648
|
+
"condition": { "functionBody": "return ['ckmkzq'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
777
649
|
},
|
|
778
650
|
"dpStatus": {
|
|
779
651
|
"type": "integer",
|
|
780
652
|
"title": "Status DP",
|
|
781
653
|
"placeholder": 2,
|
|
782
|
-
"condition": {
|
|
783
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ckmkzq';"
|
|
784
|
-
}
|
|
654
|
+
"condition": { "functionBody": "return ['ckmkzq'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
785
655
|
},
|
|
786
656
|
"flipState": {
|
|
787
657
|
"type": "boolean",
|
|
788
658
|
"title": "Flip State",
|
|
789
|
-
"condition": {
|
|
790
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'ckmkzq' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cl' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'clkg';"
|
|
791
|
-
}
|
|
659
|
+
"condition": { "functionBody": "return ['ckmkzq', 'cl', 'clkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
792
660
|
},
|
|
793
661
|
"timeToOpen": {
|
|
794
662
|
"type": "integer",
|
|
795
663
|
"title": "Time to Open (seconds)",
|
|
796
664
|
"placeholder": 45,
|
|
797
|
-
"condition": {
|
|
798
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cl' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'clkg';"
|
|
799
|
-
}
|
|
665
|
+
"condition": { "functionBody": "return ['cl', 'clkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
800
666
|
},
|
|
801
667
|
"timeToTighten": {
|
|
802
668
|
"type": "integer",
|
|
803
669
|
"title": "Time to Tighten (seconds)",
|
|
804
670
|
"placeholder": 0,
|
|
805
|
-
"condition": {
|
|
806
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cl' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'clkg';"
|
|
807
|
-
}
|
|
671
|
+
"condition": { "functionBody": "return ['cl', 'clkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
808
672
|
},
|
|
809
673
|
"timeToClose": {
|
|
810
674
|
"type": "integer",
|
|
811
675
|
"title": "Time to Close (seconds)",
|
|
812
676
|
"placeholder": 30,
|
|
813
677
|
"description": "Time in seconds for blinds to fully open or close",
|
|
814
|
-
"condition": {
|
|
815
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cl' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'clkg';"
|
|
816
|
-
}
|
|
678
|
+
"condition": { "functionBody": "return ['cl', 'clkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
817
679
|
},
|
|
818
680
|
"dpLight": {
|
|
819
681
|
"type": "integer",
|
|
820
682
|
"title": "Light DP",
|
|
821
683
|
"placeholder": 1,
|
|
822
|
-
"condition": {
|
|
823
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cz' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'pc' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'wkcz';"
|
|
824
|
-
}
|
|
684
|
+
"condition": { "functionBody": "return ['cz', 'pc', 'wkcz'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
825
685
|
},
|
|
826
686
|
"dpBlindType": {
|
|
827
687
|
"type": "integer",
|
|
828
688
|
"title": "Blind Type DP",
|
|
829
689
|
"placeholder": 1,
|
|
830
|
-
"condition": {
|
|
831
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'cl' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'clkg';"
|
|
832
|
-
}
|
|
690
|
+
"condition": { "functionBody": "return ['cl', 'clkg'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
833
691
|
},
|
|
834
692
|
"dpLightOn": {
|
|
835
693
|
"type": "integer",
|
|
836
694
|
"title": "Light On DP",
|
|
837
695
|
"placeholder": 9,
|
|
838
|
-
"condition": {
|
|
839
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
840
|
-
}
|
|
696
|
+
"condition": { "functionBody": "return ['fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
841
697
|
},
|
|
842
698
|
"dpFanOn": {
|
|
843
699
|
"type": "integer",
|
|
844
700
|
"title": "Fan On DP",
|
|
845
701
|
"placeholder": 1,
|
|
846
|
-
"condition": {
|
|
847
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
848
|
-
}
|
|
702
|
+
"condition": { "functionBody": "return ['fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
849
703
|
},
|
|
850
704
|
"dpRotationSpeed": {
|
|
851
705
|
"type": "integer",
|
|
852
706
|
"title": "Rotation Speed DP",
|
|
853
707
|
"placeholder": 4,
|
|
854
|
-
"condition": {
|
|
855
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn' || ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
856
|
-
}
|
|
708
|
+
"condition": { "functionBody": "return ['qn', 'fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
857
709
|
},
|
|
858
710
|
"dpRotationDirection": {
|
|
859
711
|
"type": "integer",
|
|
860
712
|
"title": "Rotation Direction DP",
|
|
861
713
|
"placeholder": 63,
|
|
862
|
-
"condition": {
|
|
863
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
864
|
-
}
|
|
714
|
+
"condition": { "functionBody": "return ['fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
865
715
|
},
|
|
866
716
|
"maxSpeed": {
|
|
867
717
|
"type": "integer",
|
|
868
718
|
"title": "Max Speed",
|
|
869
719
|
"placeholder": 3,
|
|
870
|
-
"condition": {
|
|
871
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
872
|
-
}
|
|
720
|
+
"condition": { "functionBody": "return ['fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
873
721
|
},
|
|
874
722
|
"fanDefaultSpeed": {
|
|
875
723
|
"type": "integer",
|
|
876
724
|
"title": "Fan Default Speed",
|
|
877
725
|
"placeholder": 1,
|
|
878
|
-
"condition": {
|
|
879
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
880
|
-
}
|
|
726
|
+
"condition": { "functionBody": "return ['fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
881
727
|
},
|
|
882
728
|
"useStrings": {
|
|
883
729
|
"type": "boolean",
|
|
884
730
|
"title": "Use Strings",
|
|
885
731
|
"placeholder": true,
|
|
886
|
-
"condition": {
|
|
887
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'fs';"
|
|
888
|
-
}
|
|
732
|
+
"condition": { "functionBody": "return ['fs'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
889
733
|
},
|
|
890
734
|
"dpChildLock": {
|
|
891
735
|
"type": "integer",
|
|
892
736
|
"title": "Child Lock DP",
|
|
893
737
|
"placeholder": 6,
|
|
894
|
-
"condition": {
|
|
895
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
896
|
-
}
|
|
738
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
897
739
|
},
|
|
898
740
|
"dpTemperatureDisplayUnits": {
|
|
899
741
|
"type": "integer",
|
|
900
742
|
"title": "Temperature Display Units DP",
|
|
901
743
|
"placeholder": 19,
|
|
902
|
-
"condition": {
|
|
903
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
904
|
-
}
|
|
744
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
905
745
|
},
|
|
906
746
|
"cmdLow": {
|
|
907
747
|
"type": "string",
|
|
908
748
|
"title": "Low Command",
|
|
909
749
|
"placeholder": "Low",
|
|
910
|
-
"condition": {
|
|
911
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
912
|
-
}
|
|
750
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
913
751
|
},
|
|
914
752
|
"cmdHigh": {
|
|
915
753
|
"type": "string",
|
|
916
754
|
"title": "High Command",
|
|
917
755
|
"placeholder": "High",
|
|
918
|
-
"condition": {
|
|
919
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
920
|
-
}
|
|
756
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
921
757
|
},
|
|
922
758
|
"noChildLock": {
|
|
923
759
|
"type": "boolean",
|
|
924
760
|
"title": "No Child Lock",
|
|
925
|
-
"condition": {
|
|
926
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
927
|
-
}
|
|
761
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
928
762
|
},
|
|
929
763
|
"noTemperatureUnit": {
|
|
930
764
|
"type": "boolean",
|
|
931
765
|
"title": "No Temperature Unit",
|
|
932
|
-
"condition": {
|
|
933
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
934
|
-
}
|
|
766
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
935
767
|
},
|
|
936
768
|
"temperatureDivisor": {
|
|
937
769
|
"type": "integer",
|
|
938
770
|
"title": "Temperature Divisor",
|
|
939
771
|
"placeholder": 1,
|
|
940
|
-
"condition": {
|
|
941
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
942
|
-
}
|
|
772
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
943
773
|
},
|
|
944
774
|
"thresholdTemperatureDivisor": {
|
|
945
775
|
"type": "integer",
|
|
946
776
|
"title": "Threshold Temperature Divisor",
|
|
947
777
|
"placeholder": 1,
|
|
948
|
-
"condition": {
|
|
949
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
950
|
-
}
|
|
778
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
951
779
|
},
|
|
952
780
|
"temperatureOffset": {
|
|
953
781
|
"type": "integer",
|
|
954
782
|
"title": "Temperature Offset",
|
|
955
783
|
"placeholder": 0,
|
|
956
|
-
"condition": {
|
|
957
|
-
"functionBody": "return ((model.local && model.local.devices && model.local.devices[arrayIndices[0]]) ? model.local.devices[arrayIndices[0]].category : undefined) === 'qn';"
|
|
958
|
-
}
|
|
784
|
+
"condition": { "functionBody": "return ['qn'].includes(model.local?.devices?.[arrayIndices[0]]?.category);" }
|
|
959
785
|
}
|
|
960
786
|
}
|
|
961
787
|
}
|
|
@@ -972,18 +798,8 @@
|
|
|
972
798
|
"type": "string",
|
|
973
799
|
"default": "2",
|
|
974
800
|
"oneOf": [
|
|
975
|
-
{
|
|
976
|
-
|
|
977
|
-
"enum": [
|
|
978
|
-
"1"
|
|
979
|
-
]
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
"title": "Smart Home",
|
|
983
|
-
"enum": [
|
|
984
|
-
"2"
|
|
985
|
-
]
|
|
986
|
-
}
|
|
801
|
+
{ "title": "Custom", "enum": [ "1" ] },
|
|
802
|
+
{ "title": "Smart Home", "enum": [ "2" ] }
|
|
987
803
|
]
|
|
988
804
|
},
|
|
989
805
|
"endpoint": {
|
|
@@ -1259,18 +1075,8 @@
|
|
|
1259
1075
|
"type": "string",
|
|
1260
1076
|
"default": "tuyaSmart",
|
|
1261
1077
|
"oneOf": [
|
|
1262
|
-
{
|
|
1263
|
-
|
|
1264
|
-
"enum": [
|
|
1265
|
-
"tuyaSmart"
|
|
1266
|
-
]
|
|
1267
|
-
},
|
|
1268
|
-
{
|
|
1269
|
-
"title": "Smart Life",
|
|
1270
|
-
"enum": [
|
|
1271
|
-
"smartlife"
|
|
1272
|
-
]
|
|
1273
|
-
}
|
|
1078
|
+
{ "title": "Tuya Smart", "enum": [ "tuyaSmart" ] },
|
|
1079
|
+
{ "title": "Smart Life", "enum": [ "smartlife" ] }
|
|
1274
1080
|
],
|
|
1275
1081
|
"condition": {
|
|
1276
1082
|
"functionBody": "return model.options.projectType === '2';"
|
|
@@ -1318,31 +1124,24 @@
|
|
|
1318
1124
|
},
|
|
1319
1125
|
"configFor": {
|
|
1320
1126
|
"title": "When to apply the configuration",
|
|
1321
|
-
"description": "Whether the setting is for devices on Cloud, devices on
|
|
1127
|
+
"description": "Whether the setting is for devices on Cloud, devices on Local, or used by both.",
|
|
1322
1128
|
"type": "string",
|
|
1323
1129
|
"required": true,
|
|
1324
1130
|
"default": "cloud",
|
|
1325
1131
|
"oneOf": [
|
|
1326
|
-
{
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
"cloud"
|
|
1330
|
-
]
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
"title": "LAN",
|
|
1334
|
-
"enum": [
|
|
1335
|
-
"local"
|
|
1336
|
-
]
|
|
1337
|
-
},
|
|
1338
|
-
{
|
|
1339
|
-
"title": "Both",
|
|
1340
|
-
"enum": [
|
|
1341
|
-
"both"
|
|
1342
|
-
]
|
|
1343
|
-
}
|
|
1132
|
+
{ "title": "Cloud", "enum": [ "cloud" ] },
|
|
1133
|
+
{ "title": "Local", "enum": [ "local" ] },
|
|
1134
|
+
{ "title": "Both", "enum": [ "both" ] }
|
|
1344
1135
|
]
|
|
1345
1136
|
},
|
|
1137
|
+
"garageDoorUseContactSensorForState": {
|
|
1138
|
+
"title": "Use Contact Sensor For Garage Door State",
|
|
1139
|
+
"description": "For garage door controllers only. Derive CurrentDoorState and TargetDoorState reads from doorcontact_state instead of switch_1.",
|
|
1140
|
+
"type": "boolean",
|
|
1141
|
+
"condition": {
|
|
1142
|
+
"functionBody": "return (model.options && model.options.deviceOverrides);"
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1346
1145
|
"schema": {
|
|
1347
1146
|
"title": "Schema Overriding Configs",
|
|
1348
1147
|
"type": "array",
|
|
@@ -1369,42 +1168,12 @@
|
|
|
1369
1168
|
"type": "string",
|
|
1370
1169
|
"default": "",
|
|
1371
1170
|
"oneOf": [
|
|
1372
|
-
{
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
}
|
|
1378
|
-
{
|
|
1379
|
-
"title": "Integer",
|
|
1380
|
-
"enum": [
|
|
1381
|
-
"Integer"
|
|
1382
|
-
]
|
|
1383
|
-
},
|
|
1384
|
-
{
|
|
1385
|
-
"title": "Enum",
|
|
1386
|
-
"enum": [
|
|
1387
|
-
"Enum"
|
|
1388
|
-
]
|
|
1389
|
-
},
|
|
1390
|
-
{
|
|
1391
|
-
"title": "String",
|
|
1392
|
-
"enum": [
|
|
1393
|
-
"String"
|
|
1394
|
-
]
|
|
1395
|
-
},
|
|
1396
|
-
{
|
|
1397
|
-
"title": "Json",
|
|
1398
|
-
"enum": [
|
|
1399
|
-
"Json"
|
|
1400
|
-
]
|
|
1401
|
-
},
|
|
1402
|
-
{
|
|
1403
|
-
"title": "Raw",
|
|
1404
|
-
"enum": [
|
|
1405
|
-
"Raw"
|
|
1406
|
-
]
|
|
1407
|
-
}
|
|
1171
|
+
{ "title": "Boolean", "enum": [ "Boolean" ] },
|
|
1172
|
+
{ "title": "Integer", "enum": [ "Integer" ] },
|
|
1173
|
+
{ "title": "Enum", "enum": [ "Enum" ] },
|
|
1174
|
+
{ "title": "String", "enum": [ "String" ] },
|
|
1175
|
+
{ "title": "Json", "enum": [ "Json" ] },
|
|
1176
|
+
{ "title": "Raw", "enum": [ "Raw" ] }
|
|
1408
1177
|
],
|
|
1409
1178
|
"condition": {
|
|
1410
1179
|
"functionBody": "return (model.options && model.options.deviceOverrides && model.options.deviceOverrides[arrayIndices[0]].schema && model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].code && !model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].hidden);"
|
|
@@ -1526,7 +1295,7 @@
|
|
|
1526
1295
|
"title": "Weather API",
|
|
1527
1296
|
"description": "Open-Meteo : For non-commercial use. [Weather data by Open-Meteo.com](https://open-meteo.com/)<br>Tuya : Requires authorization for Weather Service.",
|
|
1528
1297
|
"type": "string",
|
|
1529
|
-
"enum": ["Open-Meteo", "Tuya"],
|
|
1298
|
+
"enum": [ "Open-Meteo", "Tuya" ],
|
|
1530
1299
|
"default": "Open-Meteo",
|
|
1531
1300
|
"condition": {
|
|
1532
1301
|
"functionBody": "return (model.options && model.options.generateWeatherAccessory);"
|
|
@@ -1559,4 +1328,5 @@
|
|
|
1559
1328
|
}
|
|
1560
1329
|
}
|
|
1561
1330
|
}
|
|
1562
|
-
}
|
|
1331
|
+
}
|
|
1332
|
+
}
|