homebridge-melcloud-control 4.10.15 → 4.10.16

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/deviceata.js +3 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.10.15",
4
+ "version": "4.10.16",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/deviceata.js CHANGED
@@ -455,6 +455,7 @@ class DeviceAta extends EventEmitter {
455
455
  .onSet(async (value) => {
456
456
  try {
457
457
  let flag = null;
458
+ let power = null;
458
459
  switch (value) {
459
460
  case 0: //OFF - POWER OFF
460
461
  value = deviceData.Device.OperationMode;
@@ -473,7 +474,8 @@ class DeviceAta extends EventEmitter {
473
474
  break;
474
475
  };
475
476
 
476
- const payload = { operationMode: value };
477
+ power = value === 0 ? false : true;
478
+ const payload = { power: power, operationMode: value };
477
479
  if (this.logInfo) this.emit('info', `Set operation mode: ${AirConditioner.OperationModeMapEnumToString[value]}`);
478
480
  await this.melCloudAta.send(this.accountType, this.displayType, deviceData, payload, flag);
479
481
  } catch (error) {