homebridge-melcloud-control 4.0.0-beta.77 → 4.0.0-beta.78
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,9 +176,12 @@
|
|
|
176
176
|
function removeStaleDevices(configDevices, melcloudDevices) {
|
|
177
177
|
const melcloudIds = melcloudDevices.map(d => d.DeviceID);
|
|
178
178
|
const removedDevices = [];
|
|
179
|
+
const acc = pluginConfig[0].accounts[this.accountIndex];
|
|
180
|
+
|
|
179
181
|
for (let i = configDevices.length - 1; i >= 0; i--) {
|
|
180
182
|
const device = configDevices[i];
|
|
181
|
-
|
|
183
|
+
const deviceId = acc.displayType === 'melcloud' ? parseInt(device.id) : device.id;
|
|
184
|
+
if (deviceId !== 0 && !melcloudIds.includes(deviceId)) {
|
|
182
185
|
removedDevices.push(device);
|
|
183
186
|
configDevices.splice(i, 1);
|
|
184
187
|
}
|
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.
|
|
4
|
+
"version": "4.0.0-beta.78",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|