homebridge-melcloud-control 4.3.9-beta.4 → 4.3.9-beta.5

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.
@@ -211,7 +211,7 @@
211
211
 
212
212
  for (let i = configDevices.length - 1; i >= 0; i--) {
213
213
  const device = configDevices[i];
214
- if (device.id !== "0" && !melcloudIds.includes(device.id)) {
214
+ if (!melcloudIds.includes(device.id)) {
215
215
  removedDevices.push(device);
216
216
  configDevices.splice(i, 1);
217
217
  }
@@ -255,9 +255,9 @@
255
255
  if (device.Type === 3) devicesInMelCloudByType.erv.push(device);
256
256
  });
257
257
 
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");
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);
@@ -278,11 +278,7 @@
278
278
  type: device.Type,
279
279
  typeString,
280
280
  displayType: 0,
281
- name: device.DeviceName,
282
- presets: [],
283
- schedules: [],
284
- scenes: [],
285
- buttonsSensors: []
281
+ name: device.DeviceName
286
282
  };
287
283
  devicesInConfig.push(deviceInConfig);
288
284
  newDevices.push(deviceInConfig);
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",
4
+ "version": "4.3.9-beta.5",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",