homebridge-melcloud-control 4.3.2-beta.21 → 4.3.2-beta.22
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.
- package/package.json +1 -1
- package/src/melcloudata.js +6 -9
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.2-beta.
|
|
4
|
+
"version": "4.3.2-beta.22",
|
|
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/melcloudata.js
CHANGED
|
@@ -126,6 +126,11 @@ class MelCloudAta extends EventEmitter {
|
|
|
126
126
|
this.emit('mqtt', 'State', deviceData.Device);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
//check state changes
|
|
130
|
+
const deviceDataNotChanged = JSON.stringify(deviceData) === JSON.stringify(this.deviceData);
|
|
131
|
+
if (deviceDataNotChanged) return;
|
|
132
|
+
this.deviceData = deviceData;
|
|
133
|
+
|
|
129
134
|
//emit info
|
|
130
135
|
this.emit('deviceInfo', indoor.model, outdoor.model, serialNumber, firmwareAppVersion);
|
|
131
136
|
|
|
@@ -221,10 +226,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
221
226
|
}
|
|
222
227
|
|
|
223
228
|
//update state
|
|
224
|
-
if (updateState)
|
|
225
|
-
this.deviceData = deviceData;
|
|
226
|
-
await this.updateState(deviceData);
|
|
227
|
-
}
|
|
229
|
+
if (updateState) await this.updateState(deviceData);
|
|
228
230
|
});
|
|
229
231
|
} catch (error) {
|
|
230
232
|
if (this.logError) this.emit('error', `Socket connection failed: ${error}`);
|
|
@@ -232,11 +234,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
232
234
|
}
|
|
233
235
|
}
|
|
234
236
|
|
|
235
|
-
//check state changes
|
|
236
|
-
const deviceDataNotChanged = JSON.stringify(deviceData) === JSON.stringify(this.deviceData);
|
|
237
|
-
if (deviceDataNotChanged) return;
|
|
238
|
-
this.deviceData = deviceData;
|
|
239
|
-
|
|
240
237
|
//update state
|
|
241
238
|
await this.updateState(deviceData);
|
|
242
239
|
|