homebridge-melcloud-control 4.4.0-beta.20 → 4.4.0-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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/melcloudata.js +1 -13
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.20",
4
+ "version": "4.4.0-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",
@@ -32,8 +32,6 @@ class MelCloudAta extends EventEmitter {
32
32
  this.client = client;
33
33
  }).on('devicesList', async (devicesData) => {
34
34
  try {
35
- if (this.lock) return;
36
-
37
35
  deviceData = devicesData.Devices.find(device => device.DeviceID === this.deviceId);
38
36
  if (!deviceData) return;
39
37
  deviceData.Scenes = devicesData.Scenes ?? [];
@@ -47,7 +45,7 @@ class MelCloudAta extends EventEmitter {
47
45
  }).on('webSocket', async (parsedMessage) => {
48
46
  try {
49
47
  const messageData = parsedMessage?.[0]?.Data;
50
- if (!messageData || !deviceData || this.lock) return;
48
+ if (!messageData || !deviceData) return;
51
49
 
52
50
  let updateState = false;
53
51
  const unitId = messageData?.id;
@@ -251,7 +249,6 @@ class MelCloudAta extends EventEmitter {
251
249
  };
252
250
  method = 'POST';
253
251
  path = ApiUrlsHome.PostProtectionFrost;
254
- this.update(deviceData);
255
252
  break;
256
253
  case 'overheatprotection':
257
254
  payload = {
@@ -262,7 +259,6 @@ class MelCloudAta extends EventEmitter {
262
259
  };
263
260
  method = 'POST';
264
261
  path = ApiUrlsHome.PostProtectionOverheat;
265
- this.update(deviceData);
266
262
  break;
267
263
  case 'holidaymode':
268
264
  payload = {
@@ -323,14 +319,6 @@ class MelCloudAta extends EventEmitter {
323
319
  throw new Error(`Send data error: ${error.message}`);
324
320
  }
325
321
  }
326
-
327
- update(deviceData) {
328
- this.lock = true;
329
- this.emit('deviceState', deviceData)
330
- setTimeout(() => {
331
- this.lock = false;
332
- }, 5000);
333
- }
334
322
  }
335
323
 
336
324
  export default MelCloudAta;