homebridge-melcloud-control 4.0.0-beta.70 → 4.0.0-beta.72
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 +10 -10
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.
|
|
4
|
+
"version": "4.0.0-beta.72",
|
|
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
|
@@ -16,7 +16,7 @@ class DeviceAta extends EventEmitter {
|
|
|
16
16
|
AccessoryUUID = api.hap.uuid;
|
|
17
17
|
|
|
18
18
|
//account config
|
|
19
|
-
this.
|
|
19
|
+
this.accountMelcloud = account.displayType === 'melcloud' ? true : false;
|
|
20
20
|
this.device = device;
|
|
21
21
|
this.displayMode = device.displayMode;
|
|
22
22
|
this.temperatureSensor = device.temperatureSensor || false;
|
|
@@ -953,16 +953,16 @@ class DeviceAta extends EventEmitter {
|
|
|
953
953
|
|
|
954
954
|
//device info
|
|
955
955
|
const hasAutomaticFanSpeed = deviceData.Device.HasAutomaticFanSpeed ?? false;
|
|
956
|
-
const airDirectionFunction = deviceData.Device.AirDirectionFunction
|
|
957
|
-
const swingFunction = deviceData.Device.SwingFunction
|
|
956
|
+
const airDirectionFunction = this.accountMelcloud ? deviceData.Device.AirDirectionFunction : deviceData.Device.HasAirDirectionFunction;;
|
|
957
|
+
const swingFunction = this.accountMelcloud ? deviceData.Device.SwingFunction : deviceData.Device.HasSwing;
|
|
958
958
|
const hasOutdoorTemperature = deviceData.Device.HasOutdoorTemperature ?? false;
|
|
959
|
-
const
|
|
960
|
-
const
|
|
961
|
-
const modelSupportsAuto1 = deviceData.Device.ModelSupportsAuto
|
|
959
|
+
const modelSupportsFanSpeed = deviceData.Device.ModelSupportsFanSpeed || deviceData.Device.NumberOfFanSpeeds > 0;
|
|
960
|
+
const numberOfFanSpeeds = modelSupportsFanSpeed ? deviceData.Device.NumberOfFanSpeeds : 0;
|
|
961
|
+
const modelSupportsAuto1 = this.accountMelcloud ? deviceData.Device.ModelSupportsAuto : deviceData.Device.HasAutoOperationMode;
|
|
962
962
|
const modelSupportsAuto = this.autoDryFanMode >= 1 && modelSupportsAuto1
|
|
963
|
-
const modelSupportsHeat1 = deviceData.Device.ModelSupportsHeat
|
|
963
|
+
const modelSupportsHeat1 = this.accountMelcloud ? deviceData.Device.ModelSupportsHeat : deviceData.Device.HasHeatOperationMode
|
|
964
964
|
const modelSupportsHeat = this.heatDryFanMode >= 1 && modelSupportsHeat1;
|
|
965
|
-
const modelSupportsDry = deviceData.Device.ModelSupportsDry
|
|
965
|
+
const modelSupportsDry = this.accountMelcloud ? deviceData.Device.ModelSupportsDry : deviceData.Device.HasDryOperationMode;
|
|
966
966
|
const modelSupportsCool = this.coolDryFanMode >= 1;
|
|
967
967
|
const minTempHeat = 10;
|
|
968
968
|
const maxTempHeat = 31;
|
|
@@ -978,8 +978,8 @@ class DeviceAta extends EventEmitter {
|
|
|
978
978
|
const defaultCoolingSetTemperature = deviceData.Device.DefaultCoolingSetTemperature ?? 23;
|
|
979
979
|
const actualFanSpeed = deviceData.Device.ActualFanSpeed;
|
|
980
980
|
const automaticFanSpeed = deviceData.Device.AutomaticFanSpeed;
|
|
981
|
-
const fanSpeed = deviceData.Device.FanSpeed
|
|
982
|
-
const operationMode = this.
|
|
981
|
+
const fanSpeed = this.accountMelcloud ? deviceData.Device.FanSpeed : deviceData.Device.SetFanSpeed;
|
|
982
|
+
const operationMode = this.accountMelcloud ? deviceData.Device.OperationMode : AirConditioner.OperationModeMap[deviceData.Device.OperationMode];
|
|
983
983
|
const vaneVerticalDirection = deviceData.Device.VaneVerticalDirection;
|
|
984
984
|
const vaneVerticalSwing = deviceData.Device.VaneVerticalSwing;
|
|
985
985
|
const vaneHorizontalDirection = deviceData.Device.VaneHorizontalDirection;
|