homebridge-melcloud-control 3.3.21-beta.5 → 3.3.21-beta.6

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.3.21-beta.5",
4
+ "version": "3.3.21-beta.6",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -58,14 +58,14 @@
58
58
  ],
59
59
  "HorizontalVane": [
60
60
  "AUTO",
61
- "1",
62
- "2",
63
- "3",
64
- "4",
65
- "5",
66
- "SPLIT",
61
+ "LL",
62
+ "L",
63
+ "C",
64
+ "R",
65
+ "RR",
66
+ "6",
67
67
  "7",
68
- "8",
68
+ "SPLIT",
69
69
  "9",
70
70
  "10",
71
71
  "11",
package/src/deviceata.js CHANGED
@@ -597,8 +597,8 @@ class DeviceAta extends EventEmitter {
597
597
  const info = hasOutdoorTemperature && outdoorTemperature !== null ? this.emit('message', `Outdoor temperature: ${outdoorTemperature}${this.accessory.temperatureUnit}`) : false;
598
598
  const info3 = modelSupportsFanSpeed ? this.emit('message', `Target fan speed: ${CONSTANTS.AirConditioner.FanSpeed[fanSpeed]}`) : false;
599
599
  const info4 = modelSupportsFanSpeed ? this.emit('message', `Current fan speed: ${CONSTANTS.AirConditioner.FanSpeed[actualFanSpeed]}`) : false;
600
- const info5 = vaneHorizontalDirection !== null ? this.emit('message', `Vane horizontal: ${CONSTANTS.AirConditioner.HorizontalVane[vaneHorizontalDirection]}`) : false;
601
- const info6 = vaneVerticalDirection !== null ? this.emit('message', `Vane vertical: ${CONSTANTS.AirConditioner.VerticalVane[vaneVerticalDirection]}`) : false;
600
+ const info5 = vaneHorizontalDirection !== null ? this.emit('message', `Vane horizontal: ${CONSTANTS.AirConditioner.HorizontalVane[vaneHorizontalDirection] ?? vaneHorizontalDirection}`) : false;
601
+ const info6 = vaneVerticalDirection !== null ? this.emit('message', `Vane vertical: ${CONSTANTS.AirConditioner.VerticalVane[vaneVerticalDirection] ?? vaneVerticalDirection}`) : false;
602
602
  const info7 = swingFunction ? this.emit('message', `Air direction: ${CONSTANTS.AirConditioner.AirDirection[this.accessory.swingMode]}`) : false;
603
603
  this.emit('message', `Temperature display unit: ${this.accessory.temperatureUnit}`);
604
604
  this.emit('message', `Lock physical controls: ${this.accessory.lockPhysicalControl ? 'LOCKED' : 'UNLOCKED'}`);
@@ -470,11 +470,18 @@ class MelCloudAtw extends EventEmitter {
470
470
  }
471
471
 
472
472
  await this.axiosInstancePost(CONSTANTS.ApiUrls.SetAtw, payload);
473
- this.emit('deviceState', deviceData);
473
+ this.updateData(deviceData);
474
474
  return true;
475
475
  } catch (error) {
476
476
  throw new Error(`Send data error: ${error.message || error}`);
477
477
  };
478
478
  };
479
+
480
+ updateData(deviceData) {
481
+ setTimeout(() => {
482
+ this.emit('externalIntegrations', deviceData);
483
+ this.emit('deviceState', deviceData);
484
+ }, 500);
485
+ }
479
486
  };
480
487
  module.exports = MelCloudAtw;
@@ -396,11 +396,18 @@ class MelCloudErv extends EventEmitter {
396
396
  }
397
397
 
398
398
  await this.axiosInstancePost(CONSTANTS.ApiUrls.SetErv, payload);
399
- this.emit('deviceState', deviceData);
399
+ this.updateData(deviceData);
400
400
  return true;
401
401
  } catch (error) {
402
402
  throw new Error(`Send data error: ${error.message || error}`);
403
403
  };
404
404
  };
405
+
406
+ updateData(deviceData) {
407
+ setTimeout(() => {
408
+ this.emit('externalIntegrations', deviceData);
409
+ this.emit('deviceState', deviceData);
410
+ }, 500);
411
+ }
405
412
  };
406
413
  module.exports = MelCloudErv;