homebridge-melcloud-control 4.3.9-beta.2 → 4.3.9-beta.4
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 +11 -16
- package/package.json +1 -1
|
@@ -255,9 +255,9 @@
|
|
|
255
255
|
if (device.Type === 3) devicesInMelCloudByType.erv.push(device);
|
|
256
256
|
});
|
|
257
257
|
|
|
258
|
-
account.ataDevices
|
|
259
|
-
account.atwDevices
|
|
260
|
-
account.ervDevices
|
|
258
|
+
account.ataDevices = account.ataDevices.filter(d => String(d.id) !== "0");
|
|
259
|
+
account.atwDevices = account.atwDevices.filter(d => String(d.id) !== "0");
|
|
260
|
+
account.ervDevices = account.ervDevices.filter(d => String(d.id) !== "0");
|
|
261
261
|
|
|
262
262
|
const removedAta = removeStaleDevices(account.ataDevices, devicesInMelCloudByType.ata);
|
|
263
263
|
const removedAtw = removeStaleDevices(account.atwDevices, devicesInMelCloudByType.atw);
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
|
|
295
295
|
// === Process presets ===
|
|
296
296
|
const presetsInMelCloud = device.Presets || [];
|
|
297
|
-
const presetsInConfig = deviceInConfig.presets
|
|
297
|
+
const presetsInConfig = (deviceInConfig.presets ?? []).filter(p => String(p.id) !== "0");
|
|
298
298
|
const presetIds = new Set(presetsInConfig.map(p => String(p.id)));
|
|
299
299
|
|
|
300
300
|
let addedNewPreset = false;
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
// === Remove placeholder presets/schedules (id === '0') if new ones were added ===
|
|
318
318
|
if (addedNewPreset) {
|
|
319
319
|
const beforeCount = presetsInConfig.length;
|
|
320
|
-
deviceInConfig.presets = presetsInConfig
|
|
320
|
+
deviceInConfig.presets = presetsInConfig;
|
|
321
321
|
const removedCount = beforeCount - deviceInConfig.presets.length;
|
|
322
322
|
|
|
323
323
|
if (removedCount > 0 && removedCount < beforeCount) {
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
|
|
332
332
|
// === Process schedules ===
|
|
333
333
|
const schedulesInMelCloud = device.Schedule || [];
|
|
334
|
-
const schedulesInConfig = deviceInConfig.schedules
|
|
334
|
+
const schedulesInConfig = (deviceInConfig.schedules ?? []).filter(s => String(s.id) !== "0");
|
|
335
335
|
const scheduleIds = new Set(schedulesInConfig.map(s => String(s.id)));
|
|
336
336
|
|
|
337
337
|
let addedNewSchedule = false;
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
// === Remove placeholder schedules (id === '0') if new ones were added ===
|
|
355
355
|
if (addedNewSchedule) {
|
|
356
356
|
const beforeCount = schedulesInConfig.length;
|
|
357
|
-
deviceInConfig.schedules = schedulesInConfig
|
|
357
|
+
deviceInConfig.schedules = schedulesInConfig;
|
|
358
358
|
const removedCount = beforeCount - deviceInConfig.schedules.length;
|
|
359
359
|
|
|
360
360
|
if (removedCount > 0 && removedCount < beforeCount) {
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
// === Process scenes ===
|
|
366
|
-
const scenesInConfig = deviceInConfig.scenes
|
|
366
|
+
const scenesInConfig = (deviceInConfig.scenes ?? []).filter(s => String(s.id) !== "0");
|
|
367
367
|
const sceneIds = new Set(scenesInConfig.map(s => String(s.id)));
|
|
368
368
|
|
|
369
369
|
let addedNewScenes = false;
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
// === Remove placeholder scenes (id === '0') if new ones were added ===
|
|
387
387
|
if (addedNewScenes) {
|
|
388
388
|
const beforeCount = scenesInConfig.length;
|
|
389
|
-
deviceInConfig.scenes = scenesInConfig
|
|
389
|
+
deviceInConfig.scenes = scenesInConfig;
|
|
390
390
|
const removedCount = beforeCount - deviceInConfig.scenes.length;
|
|
391
391
|
|
|
392
392
|
if (removedCount > 0 && removedCount < beforeCount) {
|
|
@@ -397,8 +397,7 @@
|
|
|
397
397
|
});
|
|
398
398
|
|
|
399
399
|
// Return filtered devicesInConfig to make sure upstream code uses it
|
|
400
|
-
|
|
401
|
-
return filteredDevices;
|
|
400
|
+
return devicesInConfig;
|
|
402
401
|
} catch (error) {
|
|
403
402
|
updateInfo('info', `Error while processing device: ${JSON.stringify(error)}`, 'red');
|
|
404
403
|
}
|
|
@@ -434,11 +433,7 @@
|
|
|
434
433
|
document.getElementById('logIn').className = "btn btn-secondary";
|
|
435
434
|
} finally {
|
|
436
435
|
document.getElementById('logIn').className = "btn btn-secondary";
|
|
437
|
-
|
|
438
|
-
requestAnimationFrame(() => {
|
|
439
|
-
homebridge.hideSpinner();
|
|
440
|
-
});
|
|
441
|
-
});
|
|
436
|
+
homebridge.hideSpinner();
|
|
442
437
|
}
|
|
443
438
|
});
|
|
444
439
|
|
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.9-beta.
|
|
4
|
+
"version": "4.3.9-beta.4",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|