homebridge-melcloud-control 4.0.1-beta.0 → 4.0.1-beta.1

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.
@@ -257,7 +257,8 @@
257
257
 
258
258
  const handleDevices = (devicesInCloud, devicesInConfig, typeString, newArr, newPresets) => {
259
259
  devicesInCloud.forEach(device => {
260
- const { DeviceID: id, Type: type, DeviceName: name, Presets: presets = [] } = device;
260
+ const { Type: type, DeviceName: name, Presets: presets = [] } = device;
261
+ const id = String(device.DeviceID);
261
262
  const devObj = structuredClone({
262
263
  id,
263
264
  type,
@@ -268,7 +269,7 @@
268
269
  buttonsSensors: []
269
270
  });
270
271
 
271
- if (!devicesInConfig.some(d => d.id === id)) {
272
+ if (!devicesInConfig.some(d => String(d.id) === id)) {
272
273
  devicesInConfig.push(devObj);
273
274
  newArr.push(structuredClone(devObj));
274
275
  }
@@ -281,7 +282,7 @@
281
282
  namePrefix: false
282
283
  });
283
284
 
284
- const devConfig = devicesInConfig.find(d => d.id === id);
285
+ const devConfig = devicesInConfig.find(d => String(d.id) === id);
285
286
  if (devConfig && !devConfig.presets.some(x => x.id === p.id)) {
286
287
  devConfig.presets.push(p);
287
288
  newPresets.push(structuredClone(p));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.0.1-beta.0",
4
+ "version": "4.0.1-beta.1",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",