homebridge-melcloud-control 4.4.0-beta.4 → 4.4.0-beta.5

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.4.0-beta.4",
4
+ "version": "4.4.0-beta.5",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -309,7 +309,7 @@ class MelCloudAta extends EventEmitter {
309
309
  //send payload
310
310
  if (this.logDebug) this.emit('debug', `Send data: ${JSON.stringify(payload, null, 2)}`);
311
311
  await this.client(path, { method: method, data: payload });
312
- await this.updateState(null, deviceData);
312
+ this.update(deviceData);
313
313
 
314
314
  return true;
315
315
  default:
@@ -319,6 +319,12 @@ class MelCloudAta extends EventEmitter {
319
319
  throw new Error(`Send data error: ${error.message}`);
320
320
  }
321
321
  }
322
+
323
+ update(deviceData) {
324
+ setTimeout(() => {
325
+ this.emit('deviceState', deviceData)
326
+ }, 500);
327
+ }
322
328
  }
323
329
 
324
330
  export default MelCloudAta;