homebridge-melcloud-control 4.3.3-beta.22 → 4.3.3-beta.23
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.
|
@@ -249,11 +249,11 @@
|
|
|
249
249
|
const newDevices = { ata: [], ataPresets: [], ataSchedules: [], atw: [], atwPresets: [], atwSchedules: [], erv: [], ervPresets: [], ervSchedules: [], scenes: [] };
|
|
250
250
|
const devicesByType = { ata: [], atw: [], erv: [] };
|
|
251
251
|
|
|
252
|
-
response.Devices.forEach(
|
|
253
|
-
|
|
254
|
-
if (
|
|
255
|
-
if (
|
|
256
|
-
if (
|
|
252
|
+
response.Devices.forEach(device => {
|
|
253
|
+
device.Scenes = response.Scenes ?? [];
|
|
254
|
+
if (device.Type === 0) devicesByType.ata.push(device);
|
|
255
|
+
if (device.Type === 1) devicesByType.atw.push(device);
|
|
256
|
+
if (device.Type === 3) devicesByType.erv.push(device);
|
|
257
257
|
});
|
|
258
258
|
|
|
259
259
|
account.ataDevices ??= [];
|
|
@@ -295,6 +295,7 @@
|
|
|
295
295
|
configDevicesMap.set(deviceId, deviceInConfig);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
+
//only for melcloud
|
|
298
299
|
if (account.type === 'melcloud') {
|
|
299
300
|
|
|
300
301
|
// === Process presets ===
|
|
@@ -331,9 +332,11 @@
|
|
|
331
332
|
}
|
|
332
333
|
}
|
|
333
334
|
|
|
335
|
+
//only for melcloudhome
|
|
334
336
|
if (account.type === 'melcloudhome') {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
+
|
|
338
|
+
// === Process schedules ===
|
|
339
|
+
const schedules = device.Schedule || [];
|
|
337
340
|
const schedulesInConfig = deviceInConfig.schedules || [];
|
|
338
341
|
const scheduleIds = new Set(schedulesInConfig.map(s => String(s.id)));
|
|
339
342
|
|
|
@@ -398,7 +401,6 @@
|
|
|
398
401
|
}
|
|
399
402
|
}
|
|
400
403
|
}
|
|
401
|
-
|
|
402
404
|
});
|
|
403
405
|
|
|
404
406
|
// Return filtered devicesInConfig to make sure upstream code uses it
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.3.3-beta.
|
|
4
|
+
"version": "4.3.3-beta.23",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|