homebridge-melcloud-control 4.6.7-beta.2 → 4.6.7-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/deviceatw.js +6 -5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.6.7-beta.2",
4
+ "version": "4.6.7-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/deviceatw.js CHANGED
@@ -1669,6 +1669,7 @@ class DeviceAtw extends EventEmitter {
1669
1669
  const supportStandbyKey = accountTypeMelcloud ? 'ModelSupportsStandbyMode' : 'HasStandby';
1670
1670
  const supportHeatKey = accountTypeMelcloud ? 'CanHeat' : 'HasHeatMode';
1671
1671
  const supportCoolKey = accountTypeMelcloud ? 'CanCool' : 'HasCoolingMode';
1672
+ const supportHotWaterKey = accountTypeMelcloud ? 'HasHotWaterTank' : 'HasHotWater';
1672
1673
 
1673
1674
  //presets schedule
1674
1675
  const presetsOnServer = deviceData.Presets ?? [];
@@ -1684,10 +1685,10 @@ class DeviceAtw extends EventEmitter {
1684
1685
  const supportsStanbyMode = deviceData.Device[supportStandbyKey];
1685
1686
  const supportsHeatPump = ![1, 2, 3, 4, 5, 6, 7, 15].includes(this.hideZone);
1686
1687
  const supportsZone1 = ![2, 3, 4, 8, 9, 10, 11, 15].includes(this.hideZone);
1687
- const supportsHotWaterTank = ![3, 5, 6, 9, 10, 12, 13, 15].includes(this.hideZone) && deviceData.Device.HasHotWaterTank;
1688
+ const supportsHotWaterTank = ![3, 5, 6, 9, 10, 12, 13, 15].includes(this.hideZone) && deviceData.Device[supportHotWaterKey];
1688
1689
  const supportsZone2 = ![4, 6, 7, 10, 11, 13, 14, 15].includes(this.hideZone) && deviceData.Device.HasZone2;
1689
- const canHeat = deviceData.Device[supportCoolKey] ?? false;
1690
- const canCool = deviceData.Device[supportHeatKey] ?? false;
1690
+ const canHeat = deviceData.Device[supportHeatKey] ?? true;
1691
+ const canCool = deviceData.Device[supportCoolKey] ?? false;
1691
1692
  const heatCoolModes = canHeat && canCool ? 0 : canHeat ? 1 : canCool ? 2 : 3;
1692
1693
  const temperatureIncrement = deviceData.Device[tempStepKey] ?? 1;
1693
1694
  const minSetTemperature = deviceData.Device.MinSetTemperature ?? 10;
@@ -2061,7 +2062,7 @@ class DeviceAtw extends EventEmitter {
2061
2062
  if (this.accountType === 'melcloudhome') this.emit('info', `Signal strength: ${deviceData.Rssi}dBm`);
2062
2063
  break;
2063
2064
  case caseZone1: //Zone 1 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
2064
- operationModeText = idleZone1 ? HeatPump.ZoneOperationMapEnumToString[6] : HeatPump.ZoneOperationMapEnumToString[operationModeZone1];
2065
+ operationModeText = idleZone1 ? HeatPump.OperationModeZoneMapEnumToString[6] : HeatPump.OperationModeZoneMapEnumToString[operationModeZone1];
2065
2066
  this.emit('info', `Operation mode: ${operationModeText}`);
2066
2067
  this.emit('info', `Temperature: ${roomTemperature}${obj.temperatureUnit}`);
2067
2068
  this.emit('info', `Target temperature: ${setTemperature}${obj.temperatureUnit}`)
@@ -2077,7 +2078,7 @@ class DeviceAtw extends EventEmitter {
2077
2078
  this.emit('info', `Lock physical controls: ${lockPhysicalControl ? 'Locked' : 'Unlocked'}`);
2078
2079
  break;
2079
2080
  case caseZone2: //Zone 2 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
2080
- operationModeText = idleZone2 ? HeatPump.ZoneOperationMapEnumToString[6] : HeatPump.ZoneOperationMapEnumToString[operationModeZone2];
2081
+ operationModeText = idleZone2 ? HeatPump.OperationModeZoneMapEnumToString[6] : HeatPump.OperationModeZoneMapEnumToString[operationModeZone2];
2081
2082
  this.emit('info', `Operation mode: ${operationModeText}`);
2082
2083
  this.emit('info', `Temperature: ${roomTemperature}${obj.temperatureUnit}`);
2083
2084
  this.emit('info', `Target temperature: ${setTemperature}${obj.temperatureUnit}`)