homebridge-melcloud-control 4.3.2-beta.16 → 4.3.2-beta.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.3.2-beta.16",
4
+ "version": "4.3.2-beta.18",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -129,6 +129,7 @@ class MelCloudAta extends EventEmitter {
129
129
  //check state changes
130
130
  const deviceDataNotChanged = JSON.stringify(deviceData) === JSON.stringify(this.deviceData);
131
131
  if (deviceDataNotChanged) return;
132
+ this.deviceData = deviceData;
132
133
 
133
134
  //emit info
134
135
  this.emit('deviceInfo', indoor.model, outdoor.model, serialNumber, firmwareAppVersion);
@@ -383,7 +384,7 @@ class MelCloudAta extends EventEmitter {
383
384
  data: payload
384
385
  });
385
386
 
386
- await this.updateData(deviceData, updateState);
387
+ this.updateData(deviceData, updateState);
387
388
  return true;
388
389
  default:
389
390
  return;
@@ -394,9 +395,9 @@ class MelCloudAta extends EventEmitter {
394
395
  }
395
396
  }
396
397
 
397
- async updateData(deviceData, updateState = true) {
398
+ updateData(deviceData, updateState = true) {
398
399
  this.locks = true;
399
- if (updateState) await this.updateState(deviceData);
400
+ if (updateState) this.emit('deviceState', deviceData);
400
401
 
401
402
  setTimeout(() => {
402
403
  this.locks = false