homebridge-melcloud-control 3.8.5-beta.3 → 3.8.5-beta.4

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": "3.8.5-beta.3",
4
+ "version": "3.8.5-beta.4",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -333,14 +333,6 @@ class MelCloudAta extends EventEmitter {
333
333
  HideDryModeControl: hideDryModeControl
334
334
  }
335
335
 
336
- //check state changes
337
- const deviceDataHasNotChanged = JSON.stringify(deviceState) === JSON.stringify(this.deviceState);
338
- if (deviceDataHasNotChanged) {
339
- const debug = this.enableDebugMode ? this.emit('debug', `Device state not changed`) : false;
340
- return;
341
- }
342
- this.deviceState = deviceState;
343
-
344
336
  //restFul
345
337
  this.emit('restFul', 'info', deviceData);
346
338
  this.emit('restFul', 'state', deviceData.Device);
@@ -349,6 +341,14 @@ class MelCloudAta extends EventEmitter {
349
341
  this.emit('mqtt', 'Info', deviceData);
350
342
  this.emit('mqtt', 'State', deviceData.Device);
351
343
 
344
+ //check state changes
345
+ const deviceDataHasNotChanged = JSON.stringify(deviceState) === JSON.stringify(this.deviceState);
346
+ if (deviceDataHasNotChanged) {
347
+ const debug = this.enableDebugMode ? this.emit('debug', `Device state not changed`) : false;
348
+ return;
349
+ }
350
+ this.deviceState = deviceState;
351
+
352
352
  //emit info
353
353
  this.emit('deviceInfo', manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion);
354
354