homebridge-melcloud-control 3.8.4-beta.1 → 3.8.4-beta.3
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 +1 -1
- package/src/deviceata.js +33 -58
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.
|
|
4
|
+
"version": "3.8.4-beta.3",
|
|
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
|
@@ -1012,38 +1012,39 @@ class DeviceAta extends EventEmitter {
|
|
|
1012
1012
|
const outdoorTemperature = deviceData.Device.OutdoorTemperature;
|
|
1013
1013
|
|
|
1014
1014
|
//accessory
|
|
1015
|
-
this.accessory
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1015
|
+
this.accessory = {
|
|
1016
|
+
presets: presetsOnServer,
|
|
1017
|
+
hasAutomaticFanSpeed: hasAutomaticFanSpeed,
|
|
1018
|
+
airDirectionFunction: airDirectionFunction,
|
|
1019
|
+
swingFunction: swingFunction,
|
|
1020
|
+
hasOutdoorTemperature: hasOutdoorTemperature,
|
|
1021
|
+
numberOfFanSpeeds: numberOfFanSpeeds,
|
|
1022
|
+
modelSupportsFanSpeed: modelSupportsFanSpeed,
|
|
1023
|
+
modelSupportsAuto: modelSupportsAuto,
|
|
1024
|
+
modelSupportsHeat: modelSupportsHeat,
|
|
1025
|
+
modelSupportsDry: modelSupportsDry,
|
|
1026
|
+
modelSupportsCool: modelSupportsCool,
|
|
1027
|
+
minTempHeat: minTempHeat,
|
|
1028
|
+
maxTempHeat: maxTempHeat,
|
|
1029
|
+
minTempCoolDry: minTempCoolDry,
|
|
1030
|
+
maxTempCoolDry: maxTempCoolDry,
|
|
1031
|
+
power: power ? 1 : 0,
|
|
1032
|
+
inStandbyMode: inStandbyMode,
|
|
1033
|
+
operationMode: operationMode,
|
|
1034
|
+
roomTemperature: roomTemperature,
|
|
1035
|
+
outdoorTemperature: outdoorTemperature,
|
|
1036
|
+
setTemperature: setTemperature,
|
|
1037
|
+
defaultHeatingSetTemperature: defaultHeatingSetTemperature,
|
|
1038
|
+
defaultCoolingSetTemperature: defaultCoolingSetTemperature,
|
|
1039
|
+
actualFanSpeed: actualFanSpeed,
|
|
1040
|
+
automaticFanSpeed: automaticFanSpeed,
|
|
1041
|
+
vaneVerticalSwing: vaneVerticalSwing,
|
|
1042
|
+
vaneHorizontalSwing: vaneHorizontalSwing,
|
|
1043
|
+
swingMode: swingFunction && vaneHorizontalDirection === 12 && vaneVerticalDirection === 7 ? 1 : 0,
|
|
1044
|
+
lockPhysicalControl: prohibitSetTemperature && prohibitOperationMode && prohibitPower ? 1 : 0,
|
|
1045
|
+
temperatureIncrement: temperatureIncrement,
|
|
1046
|
+
temperatureUnit: TemperatureDisplayUnits[this.accessory.useFahrenheit],
|
|
1047
|
+
};
|
|
1047
1048
|
|
|
1048
1049
|
//operating mode 0, HEAT, DRY, COOL, 4, 5, 6, FAN, AUTO, ISEE HEAT, ISEE DRY, ISEE COOL
|
|
1049
1050
|
switch (this.displayMode) {
|
|
@@ -1091,32 +1092,6 @@ class DeviceAta extends EventEmitter {
|
|
|
1091
1092
|
this.accessory.operationModeSetPropsMaxValue = 2
|
|
1092
1093
|
this.accessory.operationModeSetPropsValidValues = modelSupportsAuto && modelSupportsHeat ? [0, 1, 2] : !modelSupportsAuto && modelSupportsHeat ? [1, 2] : modelSupportsAuto && !modelSupportsHeat ? [0, 2] : [2];
|
|
1093
1094
|
|
|
1094
|
-
//fan speed mode
|
|
1095
|
-
if (modelSupportsFanSpeed) {
|
|
1096
|
-
switch (numberOfFanSpeeds) {
|
|
1097
|
-
case 2: //Fan speed mode 2
|
|
1098
|
-
this.accessory.fanSpeed = hasAutomaticFanSpeed ? [3, 1, 2][fanSpeed] : [0, 1, 2][fanSpeed];
|
|
1099
|
-
this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 3 : 2;
|
|
1100
|
-
break;
|
|
1101
|
-
case 3: //Fan speed mode 3
|
|
1102
|
-
this.accessory.fanSpeed = hasAutomaticFanSpeed ? [4, 1, 2, 3][fanSpeed] : [0, 1, 2, 3][fanSpeed];
|
|
1103
|
-
this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 4 : 3;
|
|
1104
|
-
break;
|
|
1105
|
-
case 4: //Fan speed mode 4
|
|
1106
|
-
this.accessory.fanSpeed = hasAutomaticFanSpeed ? [5, 1, 2, 3, 4][fanSpeed] : [0, 1, 2, 3, 4][fanSpeed];
|
|
1107
|
-
this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 5 : 4;
|
|
1108
|
-
break;
|
|
1109
|
-
case 5: //Fan speed mode 5
|
|
1110
|
-
this.accessory.fanSpeed = hasAutomaticFanSpeed ? [6, 1, 2, 3, 4, 5][fanSpeed] : [0, 1, 2, 3, 4, 5][fanSpeed];
|
|
1111
|
-
this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 6 : 5;
|
|
1112
|
-
break;
|
|
1113
|
-
case 6: //Fan speed mode 6
|
|
1114
|
-
this.accessory.fanSpeed = hasAutomaticFanSpeed ? [7, 1, 2, 3, 4, 5, 6][fanSpeed] : [0, 1, 2, 3, 4, 5, 6][fanSpeed];
|
|
1115
|
-
this.accessory.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 7 : 6;
|
|
1116
|
-
break;
|
|
1117
|
-
};
|
|
1118
|
-
};
|
|
1119
|
-
|
|
1120
1095
|
//update characteristics
|
|
1121
1096
|
if (this.melCloudService) {
|
|
1122
1097
|
this.melCloudService
|