homebridge-melcloud-control 3.8.4-beta.3 → 3.8.4-beta.4

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 +29 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "3.8.4-beta.3",
4
+ "version": "3.8.4-beta.4",
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
@@ -1031,6 +1031,8 @@ class DeviceAta extends EventEmitter {
1031
1031
  power: power ? 1 : 0,
1032
1032
  inStandbyMode: inStandbyMode,
1033
1033
  operationMode: operationMode,
1034
+ currentOperationMode: 0,
1035
+ targetOperationMode: 0,
1034
1036
  roomTemperature: roomTemperature,
1035
1037
  outdoorTemperature: outdoorTemperature,
1036
1038
  setTemperature: setTemperature,
@@ -1043,7 +1045,7 @@ class DeviceAta extends EventEmitter {
1043
1045
  swingMode: swingFunction && vaneHorizontalDirection === 12 && vaneVerticalDirection === 7 ? 1 : 0,
1044
1046
  lockPhysicalControl: prohibitSetTemperature && prohibitOperationMode && prohibitPower ? 1 : 0,
1045
1047
  temperatureIncrement: temperatureIncrement,
1046
- temperatureUnit: TemperatureDisplayUnits[this.accessory.useFahrenheit],
1048
+ temperatureUnit: TemperatureDisplayUnits[this.accessory.useFahrenheit]
1047
1049
  };
1048
1050
 
1049
1051
  //operating mode 0, HEAT, DRY, COOL, 4, 5, 6, FAN, AUTO, ISEE HEAT, ISEE DRY, ISEE COOL
@@ -1092,6 +1094,32 @@ class DeviceAta extends EventEmitter {
1092
1094
  this.accessory.operationModeSetPropsMaxValue = 2
1093
1095
  this.accessory.operationModeSetPropsValidValues = modelSupportsAuto && modelSupportsHeat ? [0, 1, 2] : !modelSupportsAuto && modelSupportsHeat ? [1, 2] : modelSupportsAuto && !modelSupportsHeat ? [0, 2] : [2];
1094
1096
 
1097
+ //fan speed mode
1098
+ if (modelSupportsFanSpeed) {
1099
+ switch (numberOfFanSpeeds) {
1100
+ case 2: //Fan speed mode 2
1101
+ this.accessory.fanSpeed = hasAutomaticFanSpeed ? [3, 1, 2][fanSpeed] : [0, 1, 2][fanSpeed];
1102
+ this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 3 : 2;
1103
+ break;
1104
+ case 3: //Fan speed mode 3
1105
+ this.accessory.fanSpeed = hasAutomaticFanSpeed ? [4, 1, 2, 3][fanSpeed] : [0, 1, 2, 3][fanSpeed];
1106
+ this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 4 : 3;
1107
+ break;
1108
+ case 4: //Fan speed mode 4
1109
+ this.accessory.fanSpeed = hasAutomaticFanSpeed ? [5, 1, 2, 3, 4][fanSpeed] : [0, 1, 2, 3, 4][fanSpeed];
1110
+ this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 5 : 4;
1111
+ break;
1112
+ case 5: //Fan speed mode 5
1113
+ this.accessory.fanSpeed = hasAutomaticFanSpeed ? [6, 1, 2, 3, 4, 5][fanSpeed] : [0, 1, 2, 3, 4, 5][fanSpeed];
1114
+ this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 6 : 5;
1115
+ break;
1116
+ case 6: //Fan speed mode 6
1117
+ this.accessory.fanSpeed = hasAutomaticFanSpeed ? [7, 1, 2, 3, 4, 5, 6][fanSpeed] : [0, 1, 2, 3, 4, 5, 6][fanSpeed];
1118
+ this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 7 : 6;
1119
+ break;
1120
+ };
1121
+ };
1122
+
1095
1123
  //update characteristics
1096
1124
  if (this.melCloudService) {
1097
1125
  this.melCloudService