@switchbot/homebridge-switchbot 0.2.0-alpha.1 → 1.0.1-beta.1
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/.github/workflows/nodejs-beta.yml +1 -1
- package/.github/workflows/nodejs.yml +1 -1
- package/.github/workflows/{prerelease.js → prerelease-beta.js} +0 -0
- package/CHANGELOG.md +1 -1
- package/README.md +9 -5
- package/config.schema.json +350 -126
- package/dist/devices/bots.d.ts +17 -33
- package/dist/devices/bots.d.ts.map +1 -1
- package/dist/devices/bots.js +103 -152
- package/dist/devices/bots.js.map +1 -1
- package/dist/devices/{bulb.d.ts → colorbulb.d.ts} +12 -19
- package/dist/devices/colorbulb.d.ts.map +1 -0
- package/dist/devices/{bulb.js → colorbulb.js} +32 -32
- package/dist/devices/colorbulb.js.map +1 -0
- package/dist/devices/contact.d.ts +18 -16
- package/dist/devices/contact.d.ts.map +1 -1
- package/dist/devices/contact.js +101 -44
- package/dist/devices/contact.js.map +1 -1
- package/dist/devices/curtains.d.ts +17 -51
- package/dist/devices/curtains.d.ts.map +1 -1
- package/dist/devices/curtains.js +168 -248
- package/dist/devices/curtains.js.map +1 -1
- package/dist/devices/humidifiers.d.ts +13 -4
- package/dist/devices/humidifiers.d.ts.map +1 -1
- package/dist/devices/humidifiers.js +78 -8
- package/dist/devices/humidifiers.js.map +1 -1
- package/dist/devices/indoorcam.d.ts +6 -13
- package/dist/devices/indoorcam.d.ts.map +1 -1
- package/dist/devices/indoorcam.js.map +1 -1
- package/dist/devices/meters.d.ts +12 -15
- package/dist/devices/meters.d.ts.map +1 -1
- package/dist/devices/meters.js +35 -44
- package/dist/devices/meters.js.map +1 -1
- package/dist/devices/motion.d.ts +17 -15
- package/dist/devices/motion.d.ts.map +1 -1
- package/dist/devices/motion.js +87 -40
- package/dist/devices/motion.js.map +1 -1
- package/dist/devices/plugs.d.ts +6 -13
- package/dist/devices/plugs.d.ts.map +1 -1
- package/dist/devices/plugs.js.map +1 -1
- package/dist/irdevices/airconditioners.d.ts +10 -10
- package/dist/irdevices/airconditioners.d.ts.map +1 -1
- package/dist/irdevices/airconditioners.js +29 -9
- package/dist/irdevices/airconditioners.js.map +1 -1
- package/dist/irdevices/airpurifiers.d.ts +11 -11
- package/dist/irdevices/airpurifiers.d.ts.map +1 -1
- package/dist/irdevices/airpurifiers.js.map +1 -1
- package/dist/irdevices/cameras.d.ts +3 -3
- package/dist/irdevices/cameras.d.ts.map +1 -1
- package/dist/irdevices/cameras.js.map +1 -1
- package/dist/irdevices/fans.d.ts +6 -6
- package/dist/irdevices/fans.d.ts.map +1 -1
- package/dist/irdevices/fans.js +10 -10
- package/dist/irdevices/fans.js.map +1 -1
- package/dist/irdevices/lights.d.ts +3 -3
- package/dist/irdevices/lights.d.ts.map +1 -1
- package/dist/irdevices/lights.js.map +1 -1
- package/dist/irdevices/others.d.ts +3 -3
- package/dist/irdevices/others.d.ts.map +1 -1
- package/dist/irdevices/others.js.map +1 -1
- package/dist/irdevices/tvs.d.ts +3 -3
- package/dist/irdevices/tvs.d.ts.map +1 -1
- package/dist/irdevices/tvs.js +7 -5
- package/dist/irdevices/tvs.js.map +1 -1
- package/dist/irdevices/vacuumcleaners.d.ts +3 -3
- package/dist/irdevices/vacuumcleaners.d.ts.map +1 -1
- package/dist/irdevices/vacuumcleaners.js.map +1 -1
- package/dist/irdevices/waterheaters.d.ts +3 -3
- package/dist/irdevices/waterheaters.d.ts.map +1 -1
- package/dist/irdevices/waterheaters.js.map +1 -1
- package/dist/platform.d.ts +3 -2
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +136 -46
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +50 -8
- package/dist/settings.d.ts.map +1 -1
- package/package.json +65 -65
- package/src/devices/bots.ts +126 -176
- package/src/devices/{bulb.ts → colorbulb.ts} +43 -51
- package/src/devices/contact.ts +124 -68
- package/src/devices/curtains.ts +189 -300
- package/src/devices/humidifiers.ts +93 -14
- package/src/devices/indoorcam.ts +10 -20
- package/src/devices/meters.ts +53 -69
- package/src/devices/motion.ts +108 -62
- package/src/devices/plugs.ts +8 -19
- package/src/irdevices/airconditioners.ts +43 -20
- package/src/irdevices/airpurifiers.ts +15 -11
- package/src/irdevices/cameras.ts +5 -3
- package/src/irdevices/fans.ts +22 -16
- package/src/irdevices/lights.ts +5 -3
- package/src/irdevices/others.ts +5 -3
- package/src/irdevices/tvs.ts +13 -7
- package/src/irdevices/vacuumcleaners.ts +5 -3
- package/src/irdevices/waterheaters.ts +5 -3
- package/src/platform.ts +148 -49
- package/src/settings.ts +79 -8
- package/dist/devices/bulb.d.ts.map +0 -1
- package/dist/devices/bulb.js.map +0 -1
package/config.schema.json
CHANGED
|
@@ -43,7 +43,20 @@
|
|
|
43
43
|
"title": "Devices",
|
|
44
44
|
"type": "object",
|
|
45
45
|
"properties": {
|
|
46
|
-
"
|
|
46
|
+
"deviceId": {
|
|
47
|
+
"title": "Device ID",
|
|
48
|
+
"type": "string",
|
|
49
|
+
"required": true,
|
|
50
|
+
"placeholder": "81F3UT59513F"
|
|
51
|
+
},
|
|
52
|
+
"hide_device": {
|
|
53
|
+
"title": "Hide Device",
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"condition": {
|
|
56
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].ble && model.options.devices[arrayIndices].deviceId);"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"deviceType": {
|
|
47
60
|
"title": "Device Type",
|
|
48
61
|
"type": "string",
|
|
49
62
|
"required": true,
|
|
@@ -55,75 +68,56 @@
|
|
|
55
68
|
]
|
|
56
69
|
},
|
|
57
70
|
{
|
|
58
|
-
"title": "
|
|
59
|
-
"enum": [
|
|
60
|
-
"Meter"
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"title": "Humidifier",
|
|
71
|
+
"title": "Curtain",
|
|
65
72
|
"enum": [
|
|
66
|
-
"
|
|
73
|
+
"Curtain"
|
|
67
74
|
]
|
|
68
75
|
},
|
|
69
76
|
{
|
|
70
|
-
"title": "
|
|
77
|
+
"title": "Plug",
|
|
71
78
|
"enum": [
|
|
72
|
-
"
|
|
79
|
+
"Plug"
|
|
73
80
|
]
|
|
74
81
|
},
|
|
75
82
|
{
|
|
76
|
-
"title": "
|
|
83
|
+
"title": "Meter",
|
|
77
84
|
"enum": [
|
|
78
|
-
"
|
|
85
|
+
"Meter"
|
|
79
86
|
]
|
|
80
87
|
},
|
|
81
88
|
{
|
|
82
|
-
"title": "
|
|
89
|
+
"title": "Motion Sensor",
|
|
83
90
|
"enum": [
|
|
84
|
-
"
|
|
91
|
+
"Motion Sensor"
|
|
85
92
|
]
|
|
86
93
|
},
|
|
87
94
|
{
|
|
88
|
-
"title": "
|
|
95
|
+
"title": "Contact Sensor",
|
|
89
96
|
"enum": [
|
|
90
|
-
"
|
|
97
|
+
"Contact Sensor"
|
|
91
98
|
]
|
|
92
99
|
},
|
|
93
100
|
{
|
|
94
|
-
"title": "
|
|
101
|
+
"title": "Color Bulb",
|
|
95
102
|
"enum": [
|
|
96
|
-
"
|
|
103
|
+
"Color Bulb"
|
|
97
104
|
]
|
|
98
105
|
},
|
|
99
106
|
{
|
|
100
|
-
"title": "
|
|
107
|
+
"title": "Humidifier",
|
|
101
108
|
"enum": [
|
|
102
|
-
"
|
|
109
|
+
"Humidifier"
|
|
103
110
|
]
|
|
104
111
|
},
|
|
105
112
|
{
|
|
106
|
-
"title": "
|
|
113
|
+
"title": "Smart Fan",
|
|
107
114
|
"enum": [
|
|
108
|
-
"
|
|
115
|
+
"Smart Fan"
|
|
109
116
|
]
|
|
110
117
|
}
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
"deviceId": {
|
|
114
|
-
"title": "Device ID",
|
|
115
|
-
"type": "string",
|
|
116
|
-
"required": true,
|
|
117
|
-
"placeholder": "81F3UT59513F",
|
|
118
|
-
"condition": {
|
|
119
|
-
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].type);"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"hide_device": {
|
|
123
|
-
"title": "Hide Device",
|
|
124
|
-
"type": "boolean",
|
|
118
|
+
],
|
|
125
119
|
"condition": {
|
|
126
|
-
"functionBody": "return (model.options && model.options.devices &&
|
|
120
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device);"
|
|
127
121
|
}
|
|
128
122
|
},
|
|
129
123
|
"ble": {
|
|
@@ -131,7 +125,7 @@
|
|
|
131
125
|
"type": "boolean",
|
|
132
126
|
"required": true,
|
|
133
127
|
"condition": {
|
|
134
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
128
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType && model.options.devices[arrayIndices].deviceId);"
|
|
135
129
|
}
|
|
136
130
|
},
|
|
137
131
|
"bot": {
|
|
@@ -155,7 +149,7 @@
|
|
|
155
149
|
}
|
|
156
150
|
],
|
|
157
151
|
"condition": {
|
|
158
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
152
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Bot' && model.options.devices[arrayIndices].deviceId);"
|
|
159
153
|
}
|
|
160
154
|
},
|
|
161
155
|
"switch": {
|
|
@@ -163,7 +157,7 @@
|
|
|
163
157
|
"type": "boolean",
|
|
164
158
|
"description": "This allows you to display bot as a switch.",
|
|
165
159
|
"condition": {
|
|
166
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
160
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Bot' && model.options.devices[arrayIndices].deviceId && model.options.devices[arrayIndices].bot && model.options.devices[arrayIndices].bot.mode);"
|
|
167
161
|
}
|
|
168
162
|
}
|
|
169
163
|
}
|
|
@@ -175,14 +169,14 @@
|
|
|
175
169
|
"title": "Hide Meter's Temperature Sensor",
|
|
176
170
|
"type": "boolean",
|
|
177
171
|
"condition": {
|
|
178
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
172
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Meter' && model.options.devices[arrayIndices].deviceId);"
|
|
179
173
|
}
|
|
180
174
|
},
|
|
181
175
|
"hide_humidity": {
|
|
182
176
|
"title": "Hide Meter's Humidity Sensor",
|
|
183
177
|
"type": "boolean",
|
|
184
178
|
"condition": {
|
|
185
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
179
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Meter' && model.options.devices[arrayIndices].deviceId);"
|
|
186
180
|
}
|
|
187
181
|
},
|
|
188
182
|
"unit": {
|
|
@@ -204,7 +198,7 @@
|
|
|
204
198
|
],
|
|
205
199
|
"required": false,
|
|
206
200
|
"condition": {
|
|
207
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
201
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Meter' && model.options.devices[arrayIndices].deviceId && model.options.devices[arrayIndices].meter && !model.options.devices[arrayIndices].meter.hide_temperature);"
|
|
208
202
|
}
|
|
209
203
|
}
|
|
210
204
|
}
|
|
@@ -216,7 +210,7 @@
|
|
|
216
210
|
"title": "Hide Humidifier's Temperature Sensor",
|
|
217
211
|
"type": "boolean",
|
|
218
212
|
"condition": {
|
|
219
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
213
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Humidifier' && model.options.devices[arrayIndices].deviceId);"
|
|
220
214
|
}
|
|
221
215
|
},
|
|
222
216
|
"set_minStep": {
|
|
@@ -224,7 +218,7 @@
|
|
|
224
218
|
"type": "number",
|
|
225
219
|
"placeholder": "1",
|
|
226
220
|
"condition": {
|
|
227
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
221
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Humidifier' && model.options.devices[arrayIndices].deviceId);"
|
|
228
222
|
}
|
|
229
223
|
}
|
|
230
224
|
}
|
|
@@ -236,7 +230,7 @@
|
|
|
236
230
|
"title": "Disable Grouping",
|
|
237
231
|
"type": "boolean",
|
|
238
232
|
"condition": {
|
|
239
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
233
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
|
|
240
234
|
}
|
|
241
235
|
},
|
|
242
236
|
"refreshRate": {
|
|
@@ -246,7 +240,7 @@
|
|
|
246
240
|
"placeholder": 5,
|
|
247
241
|
"description": "Indicates the number of seconds between before refreshing Curtain status while updating slide progress.",
|
|
248
242
|
"condition": {
|
|
249
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
243
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
|
|
250
244
|
}
|
|
251
245
|
},
|
|
252
246
|
"set_minStep": {
|
|
@@ -254,7 +248,7 @@
|
|
|
254
248
|
"type": "number",
|
|
255
249
|
"placeholder": "1",
|
|
256
250
|
"condition": {
|
|
257
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
251
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
|
|
258
252
|
}
|
|
259
253
|
},
|
|
260
254
|
"set_min": {
|
|
@@ -262,7 +256,7 @@
|
|
|
262
256
|
"type": "number",
|
|
263
257
|
"placeholder": "0",
|
|
264
258
|
"condition": {
|
|
265
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
259
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
|
|
266
260
|
}
|
|
267
261
|
},
|
|
268
262
|
"set_max": {
|
|
@@ -270,12 +264,12 @@
|
|
|
270
264
|
"type": "number",
|
|
271
265
|
"placeholder": "100",
|
|
272
266
|
"condition": {
|
|
273
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
267
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
|
|
274
268
|
}
|
|
275
269
|
}
|
|
276
270
|
}
|
|
277
271
|
},
|
|
278
|
-
"
|
|
272
|
+
"colorbulb": {
|
|
279
273
|
"type": "object",
|
|
280
274
|
"properties": {
|
|
281
275
|
"set_minStep": {
|
|
@@ -283,26 +277,232 @@
|
|
|
283
277
|
"type": "number",
|
|
284
278
|
"placeholder": "1",
|
|
285
279
|
"condition": {
|
|
286
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
280
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Color Bulb' && model.options.devices[arrayIndices].deviceId);"
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"irdevices": {
|
|
289
|
+
"type": "array",
|
|
290
|
+
"items": {
|
|
291
|
+
"title": "IR Devices",
|
|
292
|
+
"type": "object",
|
|
293
|
+
"properties": {
|
|
294
|
+
"deviceId": {
|
|
295
|
+
"title": "Device ID",
|
|
296
|
+
"type": "string",
|
|
297
|
+
"required": true,
|
|
298
|
+
"placeholder": "81F3UT59513F"
|
|
299
|
+
},
|
|
300
|
+
"hide_device": {
|
|
301
|
+
"title": "Hide Device",
|
|
302
|
+
"type": "boolean",
|
|
303
|
+
"condition": {
|
|
304
|
+
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId);"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"remoteType": {
|
|
308
|
+
"title": "Remote Type",
|
|
309
|
+
"type": "string",
|
|
310
|
+
"required": true,
|
|
311
|
+
"oneOf": [
|
|
312
|
+
{
|
|
313
|
+
"title": "Air Conditioner (IR)",
|
|
314
|
+
"enum": [
|
|
315
|
+
"Air Conditioner"
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"title": "DIY Air Conditioner (IR)",
|
|
320
|
+
"enum": [
|
|
321
|
+
"DIY Air Conditioner"
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"title": "TV (IR)",
|
|
326
|
+
"enum": [
|
|
327
|
+
"TV"
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"title": "DIY TV (IR)",
|
|
332
|
+
"enum": [
|
|
333
|
+
"DIY TV"
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"title": "Light (IR)",
|
|
338
|
+
"enum": [
|
|
339
|
+
"Light"
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"title": "DIY Light (IR)",
|
|
344
|
+
"enum": [
|
|
345
|
+
"DIY Light"
|
|
346
|
+
]
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"title": "IPTV (IR)",
|
|
350
|
+
"enum": [
|
|
351
|
+
"IPTV"
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"title": "DIY IPTV (IR)",
|
|
356
|
+
"enum": [
|
|
357
|
+
"DIY IPTV"
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"title": "Set Top Box (IR)",
|
|
362
|
+
"enum": [
|
|
363
|
+
"Set Top Box"
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"title": "DIY Set Top Box (IR)",
|
|
368
|
+
"enum": [
|
|
369
|
+
"DIY Set Top Box"
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"title": "DVD (IR)",
|
|
374
|
+
"enum": [
|
|
375
|
+
"DVD"
|
|
376
|
+
]
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"title": "DIY DVD (IR)",
|
|
380
|
+
"enum": [
|
|
381
|
+
"DIY DVD"
|
|
382
|
+
]
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"title": "Fan (IR)",
|
|
386
|
+
"enum": [
|
|
387
|
+
"Fan"
|
|
388
|
+
]
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"title": "DIY Fan (IR)",
|
|
392
|
+
"enum": [
|
|
393
|
+
"DIY Fan"
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"title": "Projector (IR)",
|
|
398
|
+
"enum": [
|
|
399
|
+
"Projector"
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"title": "DIY Projector (IR)",
|
|
404
|
+
"enum": [
|
|
405
|
+
"DIY Projector"
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"title": "Camera (IR)",
|
|
410
|
+
"enum": [
|
|
411
|
+
"Camera"
|
|
412
|
+
]
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"title": "DIY Camera (IR)",
|
|
416
|
+
"enum": [
|
|
417
|
+
"DIY Camera"
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"title": "Air Purifier (IR)",
|
|
422
|
+
"enum": [
|
|
423
|
+
"Air Purifier"
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"title": "DIY Air Purifier (IR)",
|
|
428
|
+
"enum": [
|
|
429
|
+
"DIY Air Purifier"
|
|
430
|
+
]
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"title": "Speaker (IR)",
|
|
434
|
+
"enum": [
|
|
435
|
+
"Speaker"
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"title": "DIY Speaker (IR)",
|
|
440
|
+
"enum": [
|
|
441
|
+
"DIY Speaker"
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"title": "Water Heater (IR)",
|
|
446
|
+
"enum": [
|
|
447
|
+
"Water Heater"
|
|
448
|
+
]
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"title": "DIY Water Heater (IR)",
|
|
452
|
+
"enum": [
|
|
453
|
+
"DIY Water Heater"
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"title": "Vacuum Cleaner (IR)",
|
|
458
|
+
"enum": [
|
|
459
|
+
"Vacuum Cleaner"
|
|
460
|
+
]
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"title": "DIY Vacuum Cleaner (IR)",
|
|
464
|
+
"enum": [
|
|
465
|
+
"DIY Vacuum Cleaner"
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"title": "Others (IR)",
|
|
470
|
+
"enum": [
|
|
471
|
+
"Others"
|
|
472
|
+
]
|
|
473
|
+
}
|
|
474
|
+
],
|
|
475
|
+
"condition": {
|
|
476
|
+
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device);"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"irair": {
|
|
480
|
+
"type": "object",
|
|
481
|
+
"properties": {
|
|
482
|
+
"hide_automode": {
|
|
483
|
+
"title": "Hide Auto Mode on IR Air Conditioners",
|
|
484
|
+
"type": "boolean",
|
|
485
|
+
"condition": {
|
|
486
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].remoteType === 'Air Conditioner' || model.options.irdevices[arrayIndices].remoteType === 'DIY Air Conditioner') && model.options.irdevices[arrayIndices].deviceId);"
|
|
287
487
|
}
|
|
288
488
|
}
|
|
289
489
|
}
|
|
290
490
|
},
|
|
291
|
-
"
|
|
491
|
+
"irfan": {
|
|
292
492
|
"type": "object",
|
|
293
493
|
"properties": {
|
|
294
494
|
"swing_mode": {
|
|
295
495
|
"title": "Enable Swing Mode by Device ID",
|
|
296
496
|
"type": "boolean",
|
|
297
497
|
"condition": {
|
|
298
|
-
"functionBody": "return (model.options && model.options.
|
|
498
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].remoteType === 'Fan' || model.options.irdevices[arrayIndices].remoteType === 'DIY Fan') && model.options.irdevices[arrayIndices].deviceId);"
|
|
299
499
|
}
|
|
300
500
|
},
|
|
301
501
|
"rotation_speed": {
|
|
302
502
|
"title": "Enable Rotation Speed by Device ID",
|
|
303
503
|
"type": "boolean",
|
|
304
504
|
"condition": {
|
|
305
|
-
"functionBody": "return (model.options && model.options.
|
|
505
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].remoteType === 'Fan' || model.options.irdevices[arrayIndices].remoteType === 'DIY Fan') && model.options.irdevices[arrayIndices].deviceId);"
|
|
306
506
|
}
|
|
307
507
|
},
|
|
308
508
|
"set_minStep": {
|
|
@@ -310,7 +510,7 @@
|
|
|
310
510
|
"type": "number",
|
|
311
511
|
"placeholder": "1",
|
|
312
512
|
"condition": {
|
|
313
|
-
"functionBody": "return (model.options && model.options.
|
|
513
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].remoteType === 'Fan' || model.options.irdevices[arrayIndices].remoteType === 'DIY Fan') && model.options.irdevices[arrayIndices].deviceId && model.options.irdevices[arrayIndices].irfan && !model.options.irdevices[arrayIndices].irfan.rotation_speed);"
|
|
314
514
|
}
|
|
315
515
|
},
|
|
316
516
|
"set_min": {
|
|
@@ -318,7 +518,7 @@
|
|
|
318
518
|
"type": "number",
|
|
319
519
|
"placeholder": "0",
|
|
320
520
|
"condition": {
|
|
321
|
-
"functionBody": "return (model.options && model.options.
|
|
521
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].remoteType === 'Fan' || model.options.irdevices[arrayIndices].remoteType === 'DIY Fan') && model.options.irdevices[arrayIndices].deviceId && model.options.irdevices[arrayIndices].irfan && !model.options.irdevices[arrayIndices].irfan.rotation_speed);"
|
|
322
522
|
}
|
|
323
523
|
},
|
|
324
524
|
"set_max": {
|
|
@@ -326,19 +526,19 @@
|
|
|
326
526
|
"type": "number",
|
|
327
527
|
"placeholder": "100",
|
|
328
528
|
"condition": {
|
|
329
|
-
"functionBody": "return (model.options && model.options.
|
|
529
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].remoteType === 'Fan' || model.options.irdevices[arrayIndices].remoteType === 'DIY Fan') && model.options.irdevices[arrayIndices].deviceId && model.options.irdevices[arrayIndices].irfan && !model.options.irdevices[arrayIndices].irfan.rotation_speed);"
|
|
330
530
|
}
|
|
331
531
|
}
|
|
332
532
|
}
|
|
333
533
|
},
|
|
334
|
-
"
|
|
534
|
+
"irtv": {
|
|
335
535
|
"type": "object",
|
|
336
536
|
"properties": {
|
|
337
|
-
"
|
|
338
|
-
"title": "
|
|
537
|
+
"disable_power": {
|
|
538
|
+
"title": "Disable Power Command",
|
|
339
539
|
"type": "boolean",
|
|
340
540
|
"condition": {
|
|
341
|
-
"functionBody": "return (model.options && model.options.
|
|
541
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].remoteType === 'TV' || model.options.irdevices[arrayIndices].remoteType === 'DIY TV' || model.options.irdevices[arrayIndices].remoteType === 'Projector' || model.options.irdevices[arrayIndices].remoteType === 'DIY Projector' || model.options.irdevices[arrayIndices].remoteType === 'Set Top Box' || model.options.irdevices[arrayIndices].remoteType === 'DIY Set Top Box' || model.options.irdevices[arrayIndices].remoteType === 'IPTV' || model.options.irdevices[arrayIndices].remoteType === 'DIY IPTV' || model.options.irdevices[arrayIndices].remoteType === 'DVD' || model.options.irdevices[arrayIndices].remoteType === 'DIY DVD' || model.options.irdevices[arrayIndices].remoteType === 'Speaker' || model.options.irdevices[arrayIndices].remoteType === 'DIY Speaker') && model.options.irdevices[arrayIndices].deviceId);"
|
|
342
542
|
}
|
|
343
543
|
}
|
|
344
544
|
}
|
|
@@ -359,7 +559,7 @@
|
|
|
359
559
|
],
|
|
360
560
|
"required": false,
|
|
361
561
|
"condition": {
|
|
362
|
-
"functionBody": "return (model.options && model.options.
|
|
562
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].remoteType === 'Others' && model.options.irdevices[arrayIndices].deviceId);"
|
|
363
563
|
}
|
|
364
564
|
},
|
|
365
565
|
"commandOn": {
|
|
@@ -367,7 +567,7 @@
|
|
|
367
567
|
"type": "string",
|
|
368
568
|
"placeholder": "On",
|
|
369
569
|
"condition": {
|
|
370
|
-
"functionBody": "return (model.options && model.options.
|
|
570
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].remoteType === 'Others' && model.options.irdevices[arrayIndices].deviceId && model.options.irdevices[arrayIndices].other && model.options.irdevices[arrayIndices].other.deviceType);"
|
|
371
571
|
}
|
|
372
572
|
},
|
|
373
573
|
"commandOff": {
|
|
@@ -375,7 +575,7 @@
|
|
|
375
575
|
"type": "string",
|
|
376
576
|
"placeholder": "Off",
|
|
377
577
|
"condition": {
|
|
378
|
-
"functionBody": "return (model.options && model.options.
|
|
578
|
+
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].remoteType === 'Others' && model.options.irdevices[arrayIndices].deviceId && model.options.irdevices[arrayIndices].other && !model.options.irdevices[arrayIndices].other.deviceType);"
|
|
379
579
|
}
|
|
380
580
|
}
|
|
381
581
|
}
|
|
@@ -386,8 +586,8 @@
|
|
|
386
586
|
"refreshRate": {
|
|
387
587
|
"title": "Refresh Rate",
|
|
388
588
|
"type": "number",
|
|
389
|
-
"minimum":
|
|
390
|
-
"placeholder":
|
|
589
|
+
"minimum": 30,
|
|
590
|
+
"placeholder": 360,
|
|
391
591
|
"description": "Indicates the number of seconds between polls of SwitchBot API."
|
|
392
592
|
},
|
|
393
593
|
"pushRate": {
|
|
@@ -399,7 +599,7 @@
|
|
|
399
599
|
"debug": {
|
|
400
600
|
"title": "Logging Setting",
|
|
401
601
|
"type": "string",
|
|
402
|
-
"description": "
|
|
602
|
+
"description": "Enable 'Device' or 'Debug' logging.",
|
|
403
603
|
"oneOf": [
|
|
404
604
|
{
|
|
405
605
|
"title": "Enable Debug Logging",
|
|
@@ -431,75 +631,99 @@
|
|
|
431
631
|
]
|
|
432
632
|
},
|
|
433
633
|
{
|
|
634
|
+
"key": "options.devices",
|
|
635
|
+
"notitle": false,
|
|
636
|
+
"add": "Add Another Device",
|
|
434
637
|
"type": "fieldset",
|
|
435
|
-
"title": "
|
|
638
|
+
"title": "Optional SwitchBot Device Settings",
|
|
436
639
|
"expandable": true,
|
|
437
640
|
"expanded": false,
|
|
641
|
+
"orderable": false,
|
|
642
|
+
"buttonText": "Add Device",
|
|
438
643
|
"items": [
|
|
439
644
|
{
|
|
440
|
-
"
|
|
441
|
-
"
|
|
442
|
-
"
|
|
443
|
-
"type": "fieldset",
|
|
444
|
-
"title": "Optional Device Settings",
|
|
445
|
-
"expandable": true,
|
|
446
|
-
"expanded": false,
|
|
447
|
-
"orderable": false,
|
|
448
|
-
"buttonText": "Add Device",
|
|
645
|
+
"type": "div",
|
|
646
|
+
"displayFlex": true,
|
|
647
|
+
"flex-direction": "column",
|
|
449
648
|
"items": [
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
"options.devices[].curtain.refreshRate",
|
|
468
|
-
"options.devices[].curtain.set_minStep",
|
|
469
|
-
"options.devices[].curtain.set_min",
|
|
470
|
-
"options.devices[].curtain.set_max",
|
|
471
|
-
"options.devices[].bulb.set_minStep",
|
|
472
|
-
"options.devices[].fan.rotation_speed",
|
|
473
|
-
"options.devices[].fan.set_minStep",
|
|
474
|
-
"options.devices[].fan.set_min",
|
|
475
|
-
"options.devices[].fan.set_max",
|
|
476
|
-
"options.devices[].fan.swing_mode",
|
|
477
|
-
"options.devices[].irair.hide_automode",
|
|
478
|
-
"options.devices[].other.deviceType",
|
|
479
|
-
"options.devices[].other.commandOn",
|
|
480
|
-
"options.devices[].other.commandOff"
|
|
481
|
-
]
|
|
482
|
-
}
|
|
649
|
+
"options.devices[].deviceId",
|
|
650
|
+
"options.devices[].hide_device",
|
|
651
|
+
"options.devices[].deviceType",
|
|
652
|
+
"options.devices[].ble",
|
|
653
|
+
"options.devices[].bot.mode",
|
|
654
|
+
"options.devices[].bot.switch",
|
|
655
|
+
"options.devices[].meter.hide_temperature",
|
|
656
|
+
"options.devices[].meter.hide_humidity",
|
|
657
|
+
"options.devices[].meter.unit",
|
|
658
|
+
"options.devices[].humidifier.set_minStep",
|
|
659
|
+
"options.devices[].humidifier.hide_temperature",
|
|
660
|
+
"options.devices[].curtain.disable_group",
|
|
661
|
+
"options.devices[].curtain.refreshRate",
|
|
662
|
+
"options.devices[].curtain.set_minStep",
|
|
663
|
+
"options.devices[].curtain.set_min",
|
|
664
|
+
"options.devices[].curtain.set_max",
|
|
665
|
+
"options.devices[].colorbulb.set_minStep"
|
|
483
666
|
]
|
|
484
667
|
}
|
|
485
668
|
]
|
|
486
669
|
},
|
|
487
670
|
{
|
|
488
|
-
"
|
|
489
|
-
"
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
"
|
|
493
|
-
"
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
"
|
|
497
|
-
"
|
|
671
|
+
"key": "options.irdevices",
|
|
672
|
+
"notitle": false,
|
|
673
|
+
"add": "Add Another IR Device",
|
|
674
|
+
"type": "fieldset",
|
|
675
|
+
"title": "Optional IR Device Settings",
|
|
676
|
+
"expandable": true,
|
|
677
|
+
"expanded": false,
|
|
678
|
+
"orderable": false,
|
|
679
|
+
"buttonText": "Add IR Device",
|
|
680
|
+
"items": [
|
|
681
|
+
{
|
|
682
|
+
"type": "div",
|
|
683
|
+
"displayFlex": true,
|
|
684
|
+
"flex-direction": "column",
|
|
685
|
+
"items": [
|
|
686
|
+
"options.irdevices[].deviceId",
|
|
687
|
+
"options.irdevices[].hide_device",
|
|
688
|
+
"options.irdevices[].remoteType",
|
|
689
|
+
"options.irdevices[].irair.hide_automode",
|
|
690
|
+
"options.irdevices[].irfan.rotation_speed",
|
|
691
|
+
"options.irdevices[].irfan.swing_mode",
|
|
692
|
+
"options.irdevices[].irfan.set_minStep",
|
|
693
|
+
"options.irdevices[].irfan.set_min",
|
|
694
|
+
"options.irdevices[].irfan.set_max",
|
|
695
|
+
"options.irdevices[].irtv.disable_power",
|
|
696
|
+
"options.irdevices[].other.deviceType",
|
|
697
|
+
"options.irdevices[].other.commandOn",
|
|
698
|
+
"options.irdevices[].other.commandOff"
|
|
699
|
+
]
|
|
700
|
+
}
|
|
701
|
+
]
|
|
498
702
|
},
|
|
499
703
|
{
|
|
500
|
-
"
|
|
501
|
-
"
|
|
502
|
-
|
|
503
|
-
|
|
704
|
+
"type": "fieldset",
|
|
705
|
+
"title": "Advanced Settings",
|
|
706
|
+
"expandable": true,
|
|
707
|
+
"expanded": false,
|
|
708
|
+
"items": [
|
|
709
|
+
{
|
|
710
|
+
"type": "help",
|
|
711
|
+
"helpvalue": "<h5>Refresh Rate</h5><em class='primary-text'>Refresh Rate indicates the number of seconds between polls of SwitchBot API.</em>"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"key": "options.refreshRate",
|
|
715
|
+
"notitle": true
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"type": "help",
|
|
719
|
+
"helpvalue": "<h5>Push Rate</h5><em class='primary-text'>Push Rate indicates the number of seconds between pushes to SwitchBot API, Currently only for Curtains.</em>"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"key": "options.pushRate",
|
|
723
|
+
"notitle": true
|
|
724
|
+
},
|
|
725
|
+
"options.debug"
|
|
726
|
+
]
|
|
727
|
+
}
|
|
504
728
|
]
|
|
505
729
|
}
|