homebridge-melcloud-control 4.0.0-beta.153 → 4.0.0-beta.154

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 +3 -2
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.153",
4
+ "version": "4.0.0-beta.154",
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
@@ -985,6 +985,7 @@ class DeviceAta extends EventEmitter {
985
985
  const maxTempCoolDryAuto = 31;
986
986
 
987
987
  //device state
988
+ const fanKey = this.accountType === 'melcloud' ? 'FanSpeed' : 'SetFanSpeed';
988
989
  const tempStepKey = this.accountType === 'melcloud' ? 'TemperatureIncrement' : 'HasHalfDegreeIncrements';
989
990
  const power = deviceData.Device.Power ?? false;
990
991
  const inStandbyMode = deviceData.Device.InStandbyMode ?? false;
@@ -994,7 +995,7 @@ class DeviceAta extends EventEmitter {
994
995
  const defaultCoolingSetTemperature = deviceData.Device.DefaultCoolingSetTemperature ?? 23;
995
996
  const actualFanSpeed = deviceData.Device.ActualFanSpeed;
996
997
  const automaticFanSpeed = deviceData.Device.AutomaticFanSpeed;
997
- const setFanSpeed = deviceData.Device.SetFanSpeed;
998
+ const setFanSpeed = deviceData.Device[fanKey];
998
999
  const operationMode = deviceData.Device.OperationMode;
999
1000
  const vaneVerticalDirection = deviceData.Device.VaneVerticalDirection;
1000
1001
  const vaneVerticalSwing = deviceData.Device.VaneVerticalSwing;
@@ -1195,7 +1196,7 @@ class DeviceAta extends EventEmitter {
1195
1196
  && presetData.OperationMode === operationMode
1196
1197
  && presetData.VaneHorizontalDirection === vaneHorizontalDirection
1197
1198
  && presetData.VaneVerticalDirection === vaneVerticalDirection
1198
- && presetData.SetFanSpeed === setFanSpeed) : false;
1199
+ && presetData[fanKey] === setFanSpeed) : false;
1199
1200
 
1200
1201
  const characteristicType = preset.characteristicType;
1201
1202
  this.presetsServices?.[i]?.updateCharacteristic(characteristicType, preset.state);