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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. 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.1",
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.presets = presetsOnServer;
1016
- this.accessory.hasAutomaticFanSpeed = hasAutomaticFanSpeed;
1017
- this.accessory.airDirectionFunction = airDirectionFunction;
1018
- this.accessory.swingFunction = swingFunction;
1019
- this.accessory.hasOutdoorTemperature = hasOutdoorTemperature;
1020
- this.accessory.numberOfFanSpeeds = numberOfFanSpeeds;
1021
- this.accessory.modelSupportsFanSpeed = modelSupportsFanSpeed;
1022
- this.accessory.modelSupportsAuto = modelSupportsAuto;
1023
- this.accessory.modelSupportsHeat = modelSupportsHeat;
1024
- this.accessory.modelSupportsDry = modelSupportsDry;
1025
- this.accessory.modelSupportsCool = modelSupportsCool;
1026
- this.accessory.minTempHeat = minTempHeat;
1027
- this.accessory.maxTempHeat = maxTempHeat;
1028
- this.accessory.minTempCoolDry = minTempCoolDry;
1029
- this.accessory.maxTempCoolDry = maxTempCoolDry;
1030
-
1031
- this.accessory.power = power ? 1 : 0;
1032
- this.accessory.inStandbyMode = inStandbyMode;
1033
- this.accessory.operationMode = operationMode;
1034
- this.accessory.roomTemperature = roomTemperature;
1035
- this.accessory.outdoorTemperature = outdoorTemperature;
1036
- this.accessory.setTemperature = setTemperature;
1037
- this.accessory.defaultHeatingSetTemperature = defaultHeatingSetTemperature;
1038
- this.accessory.defaultCoolingSetTemperature = defaultCoolingSetTemperature;
1039
- this.accessory.actualFanSpeed = actualFanSpeed;
1040
- this.accessory.automaticFanSpeed = automaticFanSpeed;
1041
- this.accessory.vaneVerticalSwing = vaneVerticalSwing;
1042
- this.accessory.vaneHorizontalSwing = vaneHorizontalSwing;
1043
- this.accessory.swingMode = swingFunction && vaneHorizontalDirection === 12 && vaneVerticalDirection === 7 ? 1 : 0;
1044
- this.accessory.lockPhysicalControl = prohibitSetTemperature && prohibitOperationMode && prohibitPower ? 1 : 0;
1045
- this.accessory.temperatureIncrement = temperatureIncrement;
1046
- this.accessory.temperatureUnit = TemperatureDisplayUnits[this.accessory.useFahrenheit];
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