homebridge-melcloud-control 4.0.0-beta.104 → 4.0.0-beta.106

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.0.0-beta.104",
4
+ "version": "4.0.0-beta.106",
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/constants.js CHANGED
@@ -74,7 +74,8 @@ export const AirConditioner = {
74
74
  HolidayMode: 131072,
75
75
  All: 281483566710825
76
76
  },
77
- OperationModeMap: { "0": 0, "Heat": 1, "Dry": 2, "Cool": 3, "4": 4, "5": 5, "6": 6, "Fan": 7, "Auto": 8, "Isee Heat": 9, "Isee Dry": 10, "Isee Cool": 11 },
77
+ OperationModeMapStringToEnum: { "0": 0, "Heat": 1, "Dry": 2, "Cool": 3, "4": 4, "5": 5, "6": 6, "Fan": 7, "Auto": 8, "Isee Heat": 9, "Isee Dry": 10, "Isee Cool": 11 },
78
+ OperationModeMapEnumToString: { 0: "0", 1: "Heat", 2: "Dry", 3: "Cool", 4: "4", 5: "5", 6: "6", 7: "Fan", 8: "Auto", 9: "Isee Heat", 10: "Isee Dry", 11: "Isee Cool" },
78
79
  };
79
80
 
80
81
  export const HeatPump = {
package/src/deviceata.js CHANGED
@@ -2,7 +2,7 @@ import EventEmitter from 'events';
2
2
  import MelCloudAta from './melcloudata.js';
3
3
  import RestFul from './restful.js';
4
4
  import Mqtt from './mqtt.js';
5
- import { TemperatureDisplayUnits, AirConditioner } from './constants.js';
5
+ import { TemperatureDisplayUnits, AirConditioner, ApiUrlsHome } from './constants.js';
6
6
  let Accessory, Characteristic, Service, Categories, AccessoryUUID;
7
7
 
8
8
  class DeviceAta extends EventEmitter {
@@ -980,7 +980,7 @@ class DeviceAta extends EventEmitter {
980
980
  const actualFanSpeed = deviceData.Device.ActualFanSpeed;
981
981
  const automaticFanSpeed = deviceData.Device.AutomaticFanSpeed;
982
982
  const fanSpeed = this.accountMelcloud ? deviceData.Device.FanSpeed : deviceData.Device.SetFanSpeed;
983
- const operationMode = this.accountMelcloud ? deviceData.Device.OperationMode : AirConditioner.OperationModeMap[deviceData.Device.OperationMode];
983
+ const operationMode = this.accountMelcloud ? deviceData.Device.OperationMode : AirConditioner.OperationModeMapStringToEnum[deviceData.Device.OperationMode];
984
984
  const vaneVerticalDirection = deviceData.Device.VaneVerticalDirection;
985
985
  const vaneVerticalSwing = deviceData.Device.VaneVerticalSwing;
986
986
  const vaneHorizontalDirection = deviceData.Device.VaneHorizontalDirection;
@@ -340,6 +340,7 @@ class MelCloudAta extends EventEmitter {
340
340
  break;
341
341
  };
342
342
 
343
+ deviceData.Device.OperationMode = ApiUrlsHome.OperationModeMapEnumToString[deviceData.Device.OperationMode];
343
344
  const payload = {
344
345
  data: {
345
346
  power: deviceData.Device.Power,