homebridge-melcloud-control 4.0.0-beta.77 → 4.0.0-beta.79

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.
@@ -176,6 +176,7 @@
176
176
  function removeStaleDevices(configDevices, melcloudDevices) {
177
177
  const melcloudIds = melcloudDevices.map(d => d.DeviceID);
178
178
  const removedDevices = [];
179
+
179
180
  for (let i = configDevices.length - 1; i >= 0; i--) {
180
181
  const device = configDevices[i];
181
182
  if (device.id !== 0 && !melcloudIds.includes(device.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.0.0-beta.77",
4
+ "version": "4.0.0-beta.79",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/melcloud.js CHANGED
@@ -91,6 +91,14 @@ class MelCloud extends EventEmitter {
91
91
  ...buildingStructure.Areas.flatMap(area => area.Devices),
92
92
  ...buildingStructure.Devices
93
93
  ];
94
+
95
+ // Zamiana DeviceID na string
96
+ allDevices.forEach(device => {
97
+ if (device.DeviceID !== undefined && device.DeviceID !== null) {
98
+ device.DeviceID = device.DeviceID.toString();
99
+ }
100
+ });
101
+
94
102
  devices.push(...allDevices);
95
103
  }
96
104