homebridge-melcloud-control 4.4.1-beta.47 → 4.4.1-beta.49

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) && entityId !== '0') {
218
218
  removedEntities.push(entity);
219
219
  configEntities.splice(i, 1);
220
220
  }
@@ -390,16 +390,10 @@
390
390
  if (!newDevicesCount && !newPresetsCount && !newSchedulesCount && !newScenesCount && !removedDevicesCount && !removedPresetsCount && !removedSchedulesCount && !removedScenesCount) {
391
391
  updateInfo('info', 'No changes detected.', 'white');
392
392
  } else {
393
- if (newDevicesCount)
394
- updateInfo('info', `Found new devices: ${newInMelCloud.ata.length ? `ATA: ${newInMelCloud.ata.length}` : ''} ${newInMelCloud.atw.length ? `, ATW: ${newInMelCloud.atw.length}` : ''} ${newInMelCloud.erv.length ? `, ERV: ${newInMelCloud.erv.length},` : ''}.`, 'green');
395
- if (newPresetsCount)
396
- updateInfo('info1', `Found new presets: ${newInMelCloud.ataPresets.length ? `ATA: ${newInMelCloud.ataPresets.length}` : ''} ${newInMelCloud.atwPresets.length ? `, ATW: ${newInMelCloud.atwPresets.length}` : ''} ${newInMelCloud.ervPresets.length ? `, ERV: ${newInMelCloud.ervPresets.length}` : ''}.`, 'green');
397
- if (newScenesCount || newSchedulesCount)
398
- updateInfo('info1', `Found new ${newSchedulesCount ? `schedules:` : ''} ${newInMelCloud.ataSchedules.length ? `ATA: ${newInMelCloud.ataSchedules.length}` : ''} ${newInMelCloud.atwSchedules.length ? `, ATW: ${newInMelCloud.atwSchedules.length}` : ''} ${newInMelCloud.ervSchedules.length ? `, ERV: ${newInMelCloud.ervSchedules.length}` : ''} ${newScenesCount ? `, scenes:` : ''} ${newInMelCloud.ataScenes.length ? `ATA: ${newInMelCloud.ataScenes.length}` : ''} ${newInMelCloud.atwScenes.length ? `, ATW: ${newInMelCloud.atwScenes.length}` : ''} ${newInMelCloud.ervScenes.length ? `, ERV: ${newInMelCloud.ervScenes.length}` : ''}.`, 'green');
399
- if (removedDevicesCount)
400
- updateInfo('info', `Removed devices: ${removedFromConfigAta.length ? `ATA: ${removedFromConfigAta.length}` : ''} ${removedFromConfigAtw.length ? `, ATW: ${removedFromConfigAtw.length}` : ''} ${removedFromConfigErv.length ? `, ERV: ${removedFromConfigErv.length}` : ''}.`, 'orange');
401
- if (removedPresetsCount || removedSchedulesCount || removedScenesCount)
402
- updateInfo('info1', `Removed ${removedPresetsCount ? `presets: ${removedPresetsCount}` : ''} ${removedSchedulesCount ? `, schedules: ${removedSchedulesCount}` : ''} ${removedScenesCount ? `, scenes: ${removedScenesCount}` : ''}.`, 'orange');
393
+ if (newDevicesCount || newPresetsCount || newSchedulesCount || newScenesCount)
394
+ updateInfo('info', `Found new ${newDevicesCount ? `devices:` : ''} ${newInMelCloud.ata.length ? `ATA: ${newInMelCloud.ata.length}` : ''} ${newInMelCloud.atw.length ? `, ATW: ${newInMelCloud.atw.length}` : ''} ${newInMelCloud.erv.length ? `, ERV: ${newInMelCloud.erv.length},` : ''} ${newPresetsCount ? `, presets:` : ''} ${newInMelCloud.ataPresets.length ? `ATA: ${newInMelCloud.ataPresets.length}` : ''} ${newInMelCloud.atwPresets.length ? `, ATW: ${newInMelCloud.atwPresets.length}` : ''} ${newInMelCloud.ervPresets.length ? `, ERV: ${newInMelCloud.ervPresets.length}` : ''} ${newSchedulesCount ? `, schedules:` : ''} ${newInMelCloud.ataSchedules.length ? `ATA: ${newInMelCloud.ataSchedules.length}` : ''} ${newInMelCloud.atwSchedules.length ? `, ATW: ${newInMelCloud.atwSchedules.length}` : ''} ${newInMelCloud.ervSchedules.length ? `, ERV: ${newInMelCloud.ervSchedules.length}` : ''} ${newScenesCount ? `, scenes:` : ''} ${newInMelCloud.ataScenes.length ? `ATA: ${newInMelCloud.ataScenes.length}` : ''} ${newInMelCloud.atwScenes.length ? `, ATW: ${newInMelCloud.atwScenes.length}` : ''} ${newInMelCloud.ervScenes.length ? `, ERV: ${newInMelCloud.ervScenes.length}` : ''}.`, 'green');
395
+ if (removedDevicesCount || removedPresetsCount || removedSchedulesCount || removedScenesCount)
396
+ updateInfo('info1', `Removed ${removedDevicesCount ? `devices: ${removedPresetsCount}` : ''} ${removedFromConfigAta.length ? `ATA: ${removedFromConfigAta.length}` : ''} ${removedFromConfigAtw.length ? `, ATW: ${removedFromConfigAtw.length}` : ''} ${removedFromConfigErv.length ? `, ERV: ${removedFromConfigErv.length}` : ''} ${removedPresetsCount ? `, presets: ${removedPresetsCount}` : ''} ${removedSchedulesCount ? `, schedules: ${removedSchedulesCount}` : ''} ${removedScenesCount ? `, scenes: ${removedScenesCount}` : ''}.`, 'orange');
403
397
  }
404
398
 
405
399
  await homebridge.updatePluginConfig(pluginConfig);
@@ -412,8 +406,5 @@
412
406
  homebridge.hideSpinner();
413
407
  }
414
408
  });
415
-
416
-
417
-
418
409
  })();
419
410
  </script>
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.47",
4
+ "version": "4.4.1-beta.49",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",