homebridge-melcloud-control 4.0.0-beta.108 → 4.0.0-beta.109

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.108",
4
+ "version": "4.0.0-beta.109",
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
@@ -76,6 +76,8 @@ export const AirConditioner = {
76
76
  },
77
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
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" },
79
+ FanSpeedMapStringToEnum: { "Auto": 0, "One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5, },
80
+ FanSpeedMapEnumToString: { 0: "Auto", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five" },
79
81
  };
80
82
 
81
83
  export const HeatPump = {
package/src/deviceata.js CHANGED
@@ -979,7 +979,7 @@ class DeviceAta extends EventEmitter {
979
979
  const defaultCoolingSetTemperature = deviceData.Device.DefaultCoolingSetTemperature ?? 23;
980
980
  const actualFanSpeed = deviceData.Device.ActualFanSpeed;
981
981
  const automaticFanSpeed = deviceData.Device.AutomaticFanSpeed;
982
- const fanSpeed = this.accountMelcloud ? deviceData.Device.FanSpeed : deviceData.Device.SetFanSpeed;
982
+ const fanSpeed = this.accountMelcloud ? deviceData.Device.FanSpeed : AirConditioner.FanSpeedMapStringToEnum[deviceData.Device.SetFanSpeed];
983
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;
@@ -340,6 +340,7 @@ class MelCloudAta extends EventEmitter {
340
340
  break;
341
341
  };
342
342
 
343
+ deviceData.Device.FanSpeed = AirConditioner.FanSpeedMapEnumToString[deviceData.Device.FanSpeed];
343
344
  deviceData.Device.OperationMode = AirConditioner.OperationModeMapEnumToString[deviceData.Device.OperationMode];
344
345
  const payload = {
345
346
  data: {