@switchbot/homebridge-switchbot 0.2.0-alpha.2 → 1.0.1-beta.2
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 +370 -142
- package/dist/devices/bots.d.ts +18 -34
- package/dist/devices/bots.d.ts.map +1 -1
- package/dist/devices/bots.js +166 -171
- 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} +34 -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 +170 -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 +81 -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 +38 -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 +51 -8
- package/dist/settings.d.ts.map +1 -1
- package/package.json +65 -65
- package/src/devices/bots.ts +188 -193
- package/src/devices/{bulb.ts → colorbulb.ts} +46 -51
- package/src/devices/contact.ts +124 -68
- package/src/devices/curtains.ts +192 -300
- package/src/devices/humidifiers.ts +97 -14
- package/src/devices/indoorcam.ts +10 -20
- package/src/devices/meters.ts +57 -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 +80 -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,87 +68,56 @@
|
|
|
55
68
|
]
|
|
56
69
|
},
|
|
57
70
|
{
|
|
58
|
-
"title": "
|
|
59
|
-
"enum": [
|
|
60
|
-
"Meter"
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"title": "Contact Sensor",
|
|
65
|
-
"enum": [
|
|
66
|
-
"Contact Sensor"
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"title": "Motion Sensor",
|
|
71
|
-
"enum": [
|
|
72
|
-
"Motion Sensor"
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"title": "Humidifier",
|
|
71
|
+
"title": "Curtain",
|
|
77
72
|
"enum": [
|
|
78
|
-
"
|
|
73
|
+
"Curtain"
|
|
79
74
|
]
|
|
80
75
|
},
|
|
81
76
|
{
|
|
82
|
-
"title": "
|
|
77
|
+
"title": "Plug",
|
|
83
78
|
"enum": [
|
|
84
|
-
"
|
|
79
|
+
"Plug"
|
|
85
80
|
]
|
|
86
81
|
},
|
|
87
82
|
{
|
|
88
|
-
"title": "
|
|
83
|
+
"title": "Meter",
|
|
89
84
|
"enum": [
|
|
90
|
-
"
|
|
85
|
+
"Meter"
|
|
91
86
|
]
|
|
92
87
|
},
|
|
93
88
|
{
|
|
94
|
-
"title": "
|
|
89
|
+
"title": "Motion Sensor",
|
|
95
90
|
"enum": [
|
|
96
|
-
"
|
|
91
|
+
"Motion Sensor"
|
|
97
92
|
]
|
|
98
93
|
},
|
|
99
94
|
{
|
|
100
|
-
"title": "
|
|
95
|
+
"title": "Contact Sensor",
|
|
101
96
|
"enum": [
|
|
102
|
-
"
|
|
97
|
+
"Contact Sensor"
|
|
103
98
|
]
|
|
104
99
|
},
|
|
105
100
|
{
|
|
106
|
-
"title": "
|
|
101
|
+
"title": "Color Bulb",
|
|
107
102
|
"enum": [
|
|
108
|
-
"
|
|
103
|
+
"Color Bulb"
|
|
109
104
|
]
|
|
110
105
|
},
|
|
111
106
|
{
|
|
112
|
-
"title": "
|
|
107
|
+
"title": "Humidifier",
|
|
113
108
|
"enum": [
|
|
114
|
-
"
|
|
109
|
+
"Humidifier"
|
|
115
110
|
]
|
|
116
111
|
},
|
|
117
112
|
{
|
|
118
|
-
"title": "
|
|
113
|
+
"title": "Smart Fan",
|
|
119
114
|
"enum": [
|
|
120
|
-
"
|
|
115
|
+
"Smart Fan"
|
|
121
116
|
]
|
|
122
117
|
}
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
"deviceId": {
|
|
126
|
-
"title": "Device ID",
|
|
127
|
-
"type": "string",
|
|
128
|
-
"required": true,
|
|
129
|
-
"placeholder": "81F3UT59513F",
|
|
130
|
-
"condition": {
|
|
131
|
-
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].type);"
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
"hide_device": {
|
|
135
|
-
"title": "Hide Device",
|
|
136
|
-
"type": "boolean",
|
|
118
|
+
],
|
|
137
119
|
"condition": {
|
|
138
|
-
"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);"
|
|
139
121
|
}
|
|
140
122
|
},
|
|
141
123
|
"ble": {
|
|
@@ -143,7 +125,7 @@
|
|
|
143
125
|
"type": "boolean",
|
|
144
126
|
"required": true,
|
|
145
127
|
"condition": {
|
|
146
|
-
"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);"
|
|
147
129
|
}
|
|
148
130
|
},
|
|
149
131
|
"bot": {
|
|
@@ -152,6 +134,7 @@
|
|
|
152
134
|
"mode": {
|
|
153
135
|
"title": "Mode",
|
|
154
136
|
"type": "string",
|
|
137
|
+
"required": true,
|
|
155
138
|
"oneOf": [
|
|
156
139
|
{
|
|
157
140
|
"title": "Press",
|
|
@@ -167,15 +150,30 @@
|
|
|
167
150
|
}
|
|
168
151
|
],
|
|
169
152
|
"condition": {
|
|
170
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
153
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Bot' && model.options.devices[arrayIndices].deviceId);"
|
|
171
154
|
}
|
|
172
155
|
},
|
|
173
|
-
"
|
|
174
|
-
"title": "
|
|
175
|
-
"type": "
|
|
176
|
-
"
|
|
156
|
+
"deviceType": {
|
|
157
|
+
"title": "What Type of Device do you want to display in the Home App?",
|
|
158
|
+
"type": "string",
|
|
159
|
+
"required": true,
|
|
160
|
+
"oneOf": [
|
|
161
|
+
{
|
|
162
|
+
"title": "Switch",
|
|
163
|
+
"enum": [
|
|
164
|
+
"switch"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"title": "Outlet",
|
|
169
|
+
"enum": [
|
|
170
|
+
"outlet"
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"default": "outlet",
|
|
177
175
|
"condition": {
|
|
178
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
176
|
+
"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);"
|
|
179
177
|
}
|
|
180
178
|
}
|
|
181
179
|
}
|
|
@@ -187,14 +185,14 @@
|
|
|
187
185
|
"title": "Hide Meter's Temperature Sensor",
|
|
188
186
|
"type": "boolean",
|
|
189
187
|
"condition": {
|
|
190
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
188
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Meter' && model.options.devices[arrayIndices].deviceId);"
|
|
191
189
|
}
|
|
192
190
|
},
|
|
193
191
|
"hide_humidity": {
|
|
194
192
|
"title": "Hide Meter's Humidity Sensor",
|
|
195
193
|
"type": "boolean",
|
|
196
194
|
"condition": {
|
|
197
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
195
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Meter' && model.options.devices[arrayIndices].deviceId);"
|
|
198
196
|
}
|
|
199
197
|
},
|
|
200
198
|
"unit": {
|
|
@@ -216,7 +214,7 @@
|
|
|
216
214
|
],
|
|
217
215
|
"required": false,
|
|
218
216
|
"condition": {
|
|
219
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
217
|
+
"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);"
|
|
220
218
|
}
|
|
221
219
|
}
|
|
222
220
|
}
|
|
@@ -228,7 +226,7 @@
|
|
|
228
226
|
"title": "Hide Humidifier's Temperature Sensor",
|
|
229
227
|
"type": "boolean",
|
|
230
228
|
"condition": {
|
|
231
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
229
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Humidifier' && model.options.devices[arrayIndices].deviceId);"
|
|
232
230
|
}
|
|
233
231
|
},
|
|
234
232
|
"set_minStep": {
|
|
@@ -236,7 +234,7 @@
|
|
|
236
234
|
"type": "number",
|
|
237
235
|
"placeholder": "1",
|
|
238
236
|
"condition": {
|
|
239
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
237
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Humidifier' && model.options.devices[arrayIndices].deviceId);"
|
|
240
238
|
}
|
|
241
239
|
}
|
|
242
240
|
}
|
|
@@ -248,7 +246,7 @@
|
|
|
248
246
|
"title": "Disable Grouping",
|
|
249
247
|
"type": "boolean",
|
|
250
248
|
"condition": {
|
|
251
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
249
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
|
|
252
250
|
}
|
|
253
251
|
},
|
|
254
252
|
"refreshRate": {
|
|
@@ -258,7 +256,7 @@
|
|
|
258
256
|
"placeholder": 5,
|
|
259
257
|
"description": "Indicates the number of seconds between before refreshing Curtain status while updating slide progress.",
|
|
260
258
|
"condition": {
|
|
261
|
-
"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);"
|
|
262
260
|
}
|
|
263
261
|
},
|
|
264
262
|
"set_minStep": {
|
|
@@ -266,7 +264,7 @@
|
|
|
266
264
|
"type": "number",
|
|
267
265
|
"placeholder": "1",
|
|
268
266
|
"condition": {
|
|
269
|
-
"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);"
|
|
270
268
|
}
|
|
271
269
|
},
|
|
272
270
|
"set_min": {
|
|
@@ -274,7 +272,7 @@
|
|
|
274
272
|
"type": "number",
|
|
275
273
|
"placeholder": "0",
|
|
276
274
|
"condition": {
|
|
277
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
275
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
|
|
278
276
|
}
|
|
279
277
|
},
|
|
280
278
|
"set_max": {
|
|
@@ -282,12 +280,12 @@
|
|
|
282
280
|
"type": "number",
|
|
283
281
|
"placeholder": "100",
|
|
284
282
|
"condition": {
|
|
285
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
283
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
|
|
286
284
|
}
|
|
287
285
|
}
|
|
288
286
|
}
|
|
289
287
|
},
|
|
290
|
-
"
|
|
288
|
+
"colorbulb": {
|
|
291
289
|
"type": "object",
|
|
292
290
|
"properties": {
|
|
293
291
|
"set_minStep": {
|
|
@@ -295,26 +293,232 @@
|
|
|
295
293
|
"type": "number",
|
|
296
294
|
"placeholder": "1",
|
|
297
295
|
"condition": {
|
|
298
|
-
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].
|
|
296
|
+
"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);"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"irdevices": {
|
|
305
|
+
"type": "array",
|
|
306
|
+
"items": {
|
|
307
|
+
"title": "IR Devices",
|
|
308
|
+
"type": "object",
|
|
309
|
+
"properties": {
|
|
310
|
+
"deviceId": {
|
|
311
|
+
"title": "Device ID",
|
|
312
|
+
"type": "string",
|
|
313
|
+
"required": true,
|
|
314
|
+
"placeholder": "81F3UT59513F"
|
|
315
|
+
},
|
|
316
|
+
"hide_device": {
|
|
317
|
+
"title": "Hide Device",
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"condition": {
|
|
320
|
+
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId);"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"remoteType": {
|
|
324
|
+
"title": "Remote Type",
|
|
325
|
+
"type": "string",
|
|
326
|
+
"required": true,
|
|
327
|
+
"oneOf": [
|
|
328
|
+
{
|
|
329
|
+
"title": "Air Conditioner (IR)",
|
|
330
|
+
"enum": [
|
|
331
|
+
"Air Conditioner"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"title": "DIY Air Conditioner (IR)",
|
|
336
|
+
"enum": [
|
|
337
|
+
"DIY Air Conditioner"
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"title": "TV (IR)",
|
|
342
|
+
"enum": [
|
|
343
|
+
"TV"
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"title": "DIY TV (IR)",
|
|
348
|
+
"enum": [
|
|
349
|
+
"DIY TV"
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"title": "Light (IR)",
|
|
354
|
+
"enum": [
|
|
355
|
+
"Light"
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"title": "DIY Light (IR)",
|
|
360
|
+
"enum": [
|
|
361
|
+
"DIY Light"
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"title": "IPTV (IR)",
|
|
366
|
+
"enum": [
|
|
367
|
+
"IPTV"
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"title": "DIY IPTV (IR)",
|
|
372
|
+
"enum": [
|
|
373
|
+
"DIY IPTV"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"title": "Set Top Box (IR)",
|
|
378
|
+
"enum": [
|
|
379
|
+
"Set Top Box"
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"title": "DIY Set Top Box (IR)",
|
|
384
|
+
"enum": [
|
|
385
|
+
"DIY Set Top Box"
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"title": "DVD (IR)",
|
|
390
|
+
"enum": [
|
|
391
|
+
"DVD"
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"title": "DIY DVD (IR)",
|
|
396
|
+
"enum": [
|
|
397
|
+
"DIY DVD"
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"title": "Fan (IR)",
|
|
402
|
+
"enum": [
|
|
403
|
+
"Fan"
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"title": "DIY Fan (IR)",
|
|
408
|
+
"enum": [
|
|
409
|
+
"DIY Fan"
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"title": "Projector (IR)",
|
|
414
|
+
"enum": [
|
|
415
|
+
"Projector"
|
|
416
|
+
]
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"title": "DIY Projector (IR)",
|
|
420
|
+
"enum": [
|
|
421
|
+
"DIY Projector"
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"title": "Camera (IR)",
|
|
426
|
+
"enum": [
|
|
427
|
+
"Camera"
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"title": "DIY Camera (IR)",
|
|
432
|
+
"enum": [
|
|
433
|
+
"DIY Camera"
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"title": "Air Purifier (IR)",
|
|
438
|
+
"enum": [
|
|
439
|
+
"Air Purifier"
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"title": "DIY Air Purifier (IR)",
|
|
444
|
+
"enum": [
|
|
445
|
+
"DIY Air Purifier"
|
|
446
|
+
]
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"title": "Speaker (IR)",
|
|
450
|
+
"enum": [
|
|
451
|
+
"Speaker"
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"title": "DIY Speaker (IR)",
|
|
456
|
+
"enum": [
|
|
457
|
+
"DIY Speaker"
|
|
458
|
+
]
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"title": "Water Heater (IR)",
|
|
462
|
+
"enum": [
|
|
463
|
+
"Water Heater"
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"title": "DIY Water Heater (IR)",
|
|
468
|
+
"enum": [
|
|
469
|
+
"DIY Water Heater"
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"title": "Vacuum Cleaner (IR)",
|
|
474
|
+
"enum": [
|
|
475
|
+
"Vacuum Cleaner"
|
|
476
|
+
]
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"title": "DIY Vacuum Cleaner (IR)",
|
|
480
|
+
"enum": [
|
|
481
|
+
"DIY Vacuum Cleaner"
|
|
482
|
+
]
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"title": "Others (IR)",
|
|
486
|
+
"enum": [
|
|
487
|
+
"Others"
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
],
|
|
491
|
+
"condition": {
|
|
492
|
+
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device);"
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"irair": {
|
|
496
|
+
"type": "object",
|
|
497
|
+
"properties": {
|
|
498
|
+
"hide_automode": {
|
|
499
|
+
"title": "Hide Auto Mode on IR Air Conditioners",
|
|
500
|
+
"type": "boolean",
|
|
501
|
+
"condition": {
|
|
502
|
+
"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);"
|
|
299
503
|
}
|
|
300
504
|
}
|
|
301
505
|
}
|
|
302
506
|
},
|
|
303
|
-
"
|
|
507
|
+
"irfan": {
|
|
304
508
|
"type": "object",
|
|
305
509
|
"properties": {
|
|
306
510
|
"swing_mode": {
|
|
307
511
|
"title": "Enable Swing Mode by Device ID",
|
|
308
512
|
"type": "boolean",
|
|
309
513
|
"condition": {
|
|
310
|
-
"functionBody": "return (model.options && model.options.
|
|
514
|
+
"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);"
|
|
311
515
|
}
|
|
312
516
|
},
|
|
313
517
|
"rotation_speed": {
|
|
314
518
|
"title": "Enable Rotation Speed by Device ID",
|
|
315
519
|
"type": "boolean",
|
|
316
520
|
"condition": {
|
|
317
|
-
"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);"
|
|
318
522
|
}
|
|
319
523
|
},
|
|
320
524
|
"set_minStep": {
|
|
@@ -322,7 +526,7 @@
|
|
|
322
526
|
"type": "number",
|
|
323
527
|
"placeholder": "1",
|
|
324
528
|
"condition": {
|
|
325
|
-
"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);"
|
|
326
530
|
}
|
|
327
531
|
},
|
|
328
532
|
"set_min": {
|
|
@@ -330,7 +534,7 @@
|
|
|
330
534
|
"type": "number",
|
|
331
535
|
"placeholder": "0",
|
|
332
536
|
"condition": {
|
|
333
|
-
"functionBody": "return (model.options && model.options.
|
|
537
|
+
"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);"
|
|
334
538
|
}
|
|
335
539
|
},
|
|
336
540
|
"set_max": {
|
|
@@ -338,19 +542,19 @@
|
|
|
338
542
|
"type": "number",
|
|
339
543
|
"placeholder": "100",
|
|
340
544
|
"condition": {
|
|
341
|
-
"functionBody": "return (model.options && model.options.
|
|
545
|
+
"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);"
|
|
342
546
|
}
|
|
343
547
|
}
|
|
344
548
|
}
|
|
345
549
|
},
|
|
346
|
-
"
|
|
550
|
+
"irtv": {
|
|
347
551
|
"type": "object",
|
|
348
552
|
"properties": {
|
|
349
|
-
"
|
|
350
|
-
"title": "
|
|
553
|
+
"disable_power": {
|
|
554
|
+
"title": "Disable Power Command",
|
|
351
555
|
"type": "boolean",
|
|
352
556
|
"condition": {
|
|
353
|
-
"functionBody": "return (model.options && model.options.
|
|
557
|
+
"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);"
|
|
354
558
|
}
|
|
355
559
|
}
|
|
356
560
|
}
|
|
@@ -371,7 +575,7 @@
|
|
|
371
575
|
],
|
|
372
576
|
"required": false,
|
|
373
577
|
"condition": {
|
|
374
|
-
"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);"
|
|
375
579
|
}
|
|
376
580
|
},
|
|
377
581
|
"commandOn": {
|
|
@@ -379,7 +583,7 @@
|
|
|
379
583
|
"type": "string",
|
|
380
584
|
"placeholder": "On",
|
|
381
585
|
"condition": {
|
|
382
|
-
"functionBody": "return (model.options && model.options.
|
|
586
|
+
"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);"
|
|
383
587
|
}
|
|
384
588
|
},
|
|
385
589
|
"commandOff": {
|
|
@@ -387,7 +591,7 @@
|
|
|
387
591
|
"type": "string",
|
|
388
592
|
"placeholder": "Off",
|
|
389
593
|
"condition": {
|
|
390
|
-
"functionBody": "return (model.options && model.options.
|
|
594
|
+
"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);"
|
|
391
595
|
}
|
|
392
596
|
}
|
|
393
597
|
}
|
|
@@ -398,8 +602,8 @@
|
|
|
398
602
|
"refreshRate": {
|
|
399
603
|
"title": "Refresh Rate",
|
|
400
604
|
"type": "number",
|
|
401
|
-
"minimum":
|
|
402
|
-
"placeholder":
|
|
605
|
+
"minimum": 30,
|
|
606
|
+
"placeholder": 360,
|
|
403
607
|
"description": "Indicates the number of seconds between polls of SwitchBot API."
|
|
404
608
|
},
|
|
405
609
|
"pushRate": {
|
|
@@ -411,7 +615,7 @@
|
|
|
411
615
|
"debug": {
|
|
412
616
|
"title": "Logging Setting",
|
|
413
617
|
"type": "string",
|
|
414
|
-
"description": "
|
|
618
|
+
"description": "Enable 'Device' or 'Debug' logging.",
|
|
415
619
|
"oneOf": [
|
|
416
620
|
{
|
|
417
621
|
"title": "Enable Debug Logging",
|
|
@@ -443,75 +647,99 @@
|
|
|
443
647
|
]
|
|
444
648
|
},
|
|
445
649
|
{
|
|
650
|
+
"key": "options.devices",
|
|
651
|
+
"notitle": false,
|
|
652
|
+
"add": "Add Another Device",
|
|
446
653
|
"type": "fieldset",
|
|
447
|
-
"title": "
|
|
654
|
+
"title": "Optional SwitchBot Device Settings",
|
|
448
655
|
"expandable": true,
|
|
449
656
|
"expanded": false,
|
|
657
|
+
"orderable": false,
|
|
658
|
+
"buttonText": "Add Device",
|
|
450
659
|
"items": [
|
|
451
660
|
{
|
|
452
|
-
"
|
|
453
|
-
"
|
|
454
|
-
"
|
|
455
|
-
"type": "fieldset",
|
|
456
|
-
"title": "Optional Device Settings",
|
|
457
|
-
"expandable": true,
|
|
458
|
-
"expanded": false,
|
|
459
|
-
"orderable": false,
|
|
460
|
-
"buttonText": "Add Device",
|
|
661
|
+
"type": "div",
|
|
662
|
+
"displayFlex": true,
|
|
663
|
+
"flex-direction": "column",
|
|
461
664
|
"items": [
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
"options.devices[].curtain.refreshRate",
|
|
480
|
-
"options.devices[].curtain.set_minStep",
|
|
481
|
-
"options.devices[].curtain.set_min",
|
|
482
|
-
"options.devices[].curtain.set_max",
|
|
483
|
-
"options.devices[].bulb.set_minStep",
|
|
484
|
-
"options.devices[].fan.rotation_speed",
|
|
485
|
-
"options.devices[].fan.set_minStep",
|
|
486
|
-
"options.devices[].fan.set_min",
|
|
487
|
-
"options.devices[].fan.set_max",
|
|
488
|
-
"options.devices[].fan.swing_mode",
|
|
489
|
-
"options.devices[].irair.hide_automode",
|
|
490
|
-
"options.devices[].other.deviceType",
|
|
491
|
-
"options.devices[].other.commandOn",
|
|
492
|
-
"options.devices[].other.commandOff"
|
|
493
|
-
]
|
|
494
|
-
}
|
|
665
|
+
"options.devices[].deviceId",
|
|
666
|
+
"options.devices[].hide_device",
|
|
667
|
+
"options.devices[].deviceType",
|
|
668
|
+
"options.devices[].ble",
|
|
669
|
+
"options.devices[].bot.mode",
|
|
670
|
+
"options.devices[].bot.deviceType",
|
|
671
|
+
"options.devices[].meter.hide_temperature",
|
|
672
|
+
"options.devices[].meter.hide_humidity",
|
|
673
|
+
"options.devices[].meter.unit",
|
|
674
|
+
"options.devices[].humidifier.set_minStep",
|
|
675
|
+
"options.devices[].humidifier.hide_temperature",
|
|
676
|
+
"options.devices[].curtain.disable_group",
|
|
677
|
+
"options.devices[].curtain.refreshRate",
|
|
678
|
+
"options.devices[].curtain.set_minStep",
|
|
679
|
+
"options.devices[].curtain.set_min",
|
|
680
|
+
"options.devices[].curtain.set_max",
|
|
681
|
+
"options.devices[].colorbulb.set_minStep"
|
|
495
682
|
]
|
|
496
683
|
}
|
|
497
684
|
]
|
|
498
685
|
},
|
|
499
686
|
{
|
|
500
|
-
"
|
|
501
|
-
"
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
"
|
|
505
|
-
"
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
"
|
|
509
|
-
"
|
|
687
|
+
"key": "options.irdevices",
|
|
688
|
+
"notitle": false,
|
|
689
|
+
"add": "Add Another IR Device",
|
|
690
|
+
"type": "fieldset",
|
|
691
|
+
"title": "Optional IR Device Settings",
|
|
692
|
+
"expandable": true,
|
|
693
|
+
"expanded": false,
|
|
694
|
+
"orderable": false,
|
|
695
|
+
"buttonText": "Add IR Device",
|
|
696
|
+
"items": [
|
|
697
|
+
{
|
|
698
|
+
"type": "div",
|
|
699
|
+
"displayFlex": true,
|
|
700
|
+
"flex-direction": "column",
|
|
701
|
+
"items": [
|
|
702
|
+
"options.irdevices[].deviceId",
|
|
703
|
+
"options.irdevices[].hide_device",
|
|
704
|
+
"options.irdevices[].remoteType",
|
|
705
|
+
"options.irdevices[].irair.hide_automode",
|
|
706
|
+
"options.irdevices[].irfan.rotation_speed",
|
|
707
|
+
"options.irdevices[].irfan.swing_mode",
|
|
708
|
+
"options.irdevices[].irfan.set_minStep",
|
|
709
|
+
"options.irdevices[].irfan.set_min",
|
|
710
|
+
"options.irdevices[].irfan.set_max",
|
|
711
|
+
"options.irdevices[].irtv.disable_power",
|
|
712
|
+
"options.irdevices[].other.deviceType",
|
|
713
|
+
"options.irdevices[].other.commandOn",
|
|
714
|
+
"options.irdevices[].other.commandOff"
|
|
715
|
+
]
|
|
716
|
+
}
|
|
717
|
+
]
|
|
510
718
|
},
|
|
511
719
|
{
|
|
512
|
-
"
|
|
513
|
-
"
|
|
514
|
-
|
|
515
|
-
|
|
720
|
+
"type": "fieldset",
|
|
721
|
+
"title": "Advanced Settings",
|
|
722
|
+
"expandable": true,
|
|
723
|
+
"expanded": false,
|
|
724
|
+
"items": [
|
|
725
|
+
{
|
|
726
|
+
"type": "help",
|
|
727
|
+
"helpvalue": "<h5>Refresh Rate</h5><em class='primary-text'>Refresh Rate indicates the number of seconds between polls of SwitchBot API.</em>"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"key": "options.refreshRate",
|
|
731
|
+
"notitle": true
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"type": "help",
|
|
735
|
+
"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>"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"key": "options.pushRate",
|
|
739
|
+
"notitle": true
|
|
740
|
+
},
|
|
741
|
+
"options.debug"
|
|
742
|
+
]
|
|
743
|
+
}
|
|
516
744
|
]
|
|
517
745
|
}
|