homebridge-melcloud-control 4.4.1-beta.49 → 4.4.1-beta.50
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.
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
const entity = configEntities[i];
|
|
215
215
|
const entityId = String(getConfigId(entity));
|
|
216
216
|
|
|
217
|
-
if (!serverIds.has(entityId)
|
|
217
|
+
if (!serverIds.has(entityId)) {
|
|
218
218
|
removedEntities.push(entity);
|
|
219
219
|
configEntities.splice(i, 1);
|
|
220
220
|
}
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
function mapUnitIdToScenes(scenesInMelCloud) {
|
|
237
237
|
const map = new Map();
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
scenesInMelCloud.forEach(scene => {
|
|
240
240
|
const allSceneSettings = [...(scene.AtaSceneSettings ?? []), ...(scene.AtwSceneSettings ?? []), ...(scene.ErvSceneSettings ?? [])];
|
|
241
241
|
allSceneSettings.forEach(setting => {
|
|
242
242
|
const unitId = String(setting.UnitId);
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
|
|
309
309
|
// PRESETS (melcloud)
|
|
310
310
|
if (account.type === 'melcloud') {
|
|
311
|
-
deviceInConfig.presets = deviceInConfig.presets ?? [];
|
|
311
|
+
deviceInConfig.presets = (deviceInConfig.presets ?? []).filter(p => String(p.id) !== '0');
|
|
312
312
|
const presetsInMelCloud = device.Presets ?? [];
|
|
313
313
|
removedFromConfig.presets.push(...removeStaleEntities(deviceInConfig.presets, presetsInMelCloud, p => p.id, p => p.ID));
|
|
314
314
|
const presetIds = new Set(deviceInConfig.presets.map(p => String(p.id)));
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
// SCHEDULES & SCENES (melcloudhome)
|
|
331
331
|
if (account.type === 'melcloudhome') {
|
|
332
332
|
// SCHEDULES
|
|
333
|
-
deviceInConfig.schedules = deviceInConfig.schedules ?? [];
|
|
333
|
+
deviceInConfig.schedules = (deviceInConfig.schedules ?? []).filter(s => String(s.id) !== '0');
|
|
334
334
|
const schedulesInMelCloud = device.Schedule ?? [];
|
|
335
335
|
removedFromConfig.schedules.push(...removeStaleEntities(deviceInConfig.schedules, schedulesInMelCloud, s => s.id, s => s.Id));
|
|
336
336
|
const scheduleIds = new Set(deviceInConfig.schedules.map(s => String(s.id)));
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
});
|
|
350
350
|
|
|
351
351
|
// SCENES
|
|
352
|
-
deviceInConfig.scenes = deviceInConfig.scenes ?? [];
|
|
352
|
+
deviceInConfig.scenes = (deviceInConfig.scenes ?? []).filter(s => String(s.id) !== '0');
|
|
353
353
|
const scenesForDevice = unitIdToScenes.get(deviceId) ?? [];
|
|
354
354
|
removedFromConfig.scenes.push(...removeStaleEntities(deviceInConfig.scenes, scenesForDevice, s => s.id, s => s.Id));
|
|
355
355
|
const sceneIds = new Set(deviceInConfig.scenes.map(s => String(s.id)));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.4.1-beta.
|
|
4
|
+
"version": "4.4.1-beta.50",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|