homebridge-melcloud-control 3.1.3-beta.13 → 3.1.3-beta.15
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/homebridge-ui/public/index.html +25 -28
- package/package.json +1 -1
|
@@ -151,33 +151,27 @@
|
|
|
151
151
|
const info = response.info ?? '';
|
|
152
152
|
const status = response.status;
|
|
153
153
|
const devices = response.data ?? [];
|
|
154
|
-
const devicesByType = {
|
|
155
|
-
ata: [],
|
|
156
|
-
atw: [],
|
|
157
|
-
erv: []
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
//new found devices
|
|
161
|
-
const newDevices = {
|
|
162
|
-
ata: [],
|
|
163
|
-
ataPresets: [],
|
|
164
|
-
atw: [],
|
|
165
|
-
atwPresets: [],
|
|
166
|
-
erv: [],
|
|
167
|
-
ervPresets: [],
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
//info text
|
|
171
|
-
let textAta = 'ATA: 0';
|
|
172
|
-
let textAtaPresets = 'ATA Presets: 0';
|
|
173
|
-
let textAtw = 'ATW: 0';
|
|
174
|
-
let textAtwPresets = 'ATW Presets: 0';
|
|
175
|
-
let textErv = 'ERV: 0';
|
|
176
|
-
let textErvPresets = 'ERV Presets: 0';
|
|
177
154
|
|
|
178
155
|
//response status
|
|
179
156
|
switch (status) {
|
|
180
157
|
case 0:
|
|
158
|
+
const devicesByType = {
|
|
159
|
+
ata: [],
|
|
160
|
+
atw: [],
|
|
161
|
+
erv: []
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
//info text
|
|
165
|
+
let textAta = 'ATA: 0';
|
|
166
|
+
let textAtaPresets = 'ATA Presets: 0';
|
|
167
|
+
let ataPresetsCount = 0;
|
|
168
|
+
let textAtw = 'ATW: 0';
|
|
169
|
+
let textAtwPresets = 'ATW Presets: 0';
|
|
170
|
+
let atwPresetsCount = 0;
|
|
171
|
+
let textErv = 'ERV: 0';
|
|
172
|
+
let textErvPresets = 'ERV Presets: 0';
|
|
173
|
+
let ervPresetsCount = 0;
|
|
174
|
+
|
|
181
175
|
//get devices by type
|
|
182
176
|
for (const device of devices) {
|
|
183
177
|
const deviceType = device.Type;
|
|
@@ -239,7 +233,8 @@
|
|
|
239
233
|
ataDevices[index].presets.push(preset);
|
|
240
234
|
};
|
|
241
235
|
};
|
|
242
|
-
|
|
236
|
+
ataPresetsCount = ataDevices[index].presets.length;
|
|
237
|
+
textAtaPresets = `ATA Presets: ${ataPresetsCount}`
|
|
243
238
|
});
|
|
244
239
|
textAta = `ATA: ${ataDevices.length}`
|
|
245
240
|
|
|
@@ -298,7 +293,8 @@
|
|
|
298
293
|
atwDevices[index].presets.push(preset);
|
|
299
294
|
};
|
|
300
295
|
};
|
|
301
|
-
|
|
296
|
+
atwPresetsCount = atwDevices[index].presets.length;
|
|
297
|
+
textAtwPresets = `ATW Presets: ${atwPresetsCount}`
|
|
302
298
|
});
|
|
303
299
|
textAtw = `ATW: ${atwDevices.length}`
|
|
304
300
|
|
|
@@ -351,12 +347,13 @@
|
|
|
351
347
|
ervDevices[index].presets.push(preset);
|
|
352
348
|
};
|
|
353
349
|
};
|
|
354
|
-
|
|
350
|
+
ervPresetsCount = ervDevices[index].presets.length;
|
|
351
|
+
textErvPresets = `ERV Presets: ${ervPresetsCount}`
|
|
355
352
|
});
|
|
356
353
|
textErv = `ERV: ${ervDevices.length}`
|
|
357
354
|
|
|
358
|
-
const newDevicesCount =
|
|
359
|
-
const newPresetsCount =
|
|
355
|
+
const newDevicesCount = ataDevices.length + atwDevices.length + ervDevices.length ?? 0;
|
|
356
|
+
const newPresetsCount = ataPresetsCount + atwPresetsCount + ervPresetsCount ?? 0;
|
|
360
357
|
if (newDevicesCount === 0 && newPresetsCount === 0) {
|
|
361
358
|
document.getElementById('info').innerHTML = 'No new devices found.';
|
|
362
359
|
document.getElementById('info').style.color = 'white';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.1.3-beta.
|
|
4
|
+
"version": "3.1.3-beta.15",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|