homebridge-melcloud-control 3.3.12-beta.16 → 3.3.12-beta.18
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 +23 -25
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.3.12-beta.
|
|
4
|
+
"version": "3.3.12-beta.18",
|
|
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
|
@@ -375,8 +375,8 @@ class DeviceAta extends EventEmitter {
|
|
|
375
375
|
.updateCharacteristic(Characteristic.CurrentTemperature, roomTemperature)
|
|
376
376
|
.updateCharacteristic(Characteristic.LockPhysicalControls, this.accessory.lockPhysicalControl)
|
|
377
377
|
.updateCharacteristic(Characteristic.TemperatureDisplayUnits, this.accessory.useFahrenheit);
|
|
378
|
-
const updateDefHeat = modelSupportsHeat ? this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, operationMode === 1 ? setTemperature : 10) : false;
|
|
379
378
|
const updateDefCool = modelSupportsCool ? this.melCloudService.updateCharacteristic(Characteristic.CoolingThresholdTemperature, setTemperature) : false;
|
|
379
|
+
const updateDefHeat = modelSupportsHeat ? this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, this.accessory.operationMode === 1 ? setTemperature : 10) : false;
|
|
380
380
|
const updateRS = modelSupportsFanSpeed ? this.melCloudService.updateCharacteristic(Characteristic.RotationSpeed, this.accessory.fanSpeed) : false;
|
|
381
381
|
const updateSM = swingFunction ? this.melCloudService.updateCharacteristic(Characteristic.SwingMode, this.accessory.swingMode) : false;
|
|
382
382
|
};
|
|
@@ -911,28 +911,26 @@ class DeviceAta extends EventEmitter {
|
|
|
911
911
|
};
|
|
912
912
|
});
|
|
913
913
|
};
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
});
|
|
935
|
-
};
|
|
914
|
+
this.melCloudService.getCharacteristic(Characteristic.CoolingThresholdTemperature)
|
|
915
|
+
.setProps({
|
|
916
|
+
minValue: 16,
|
|
917
|
+
maxValue: 31,
|
|
918
|
+
minStep: this.accessory.temperatureIncrement
|
|
919
|
+
})
|
|
920
|
+
.onGet(async () => {
|
|
921
|
+
const value = this.accessory.setTemperature;
|
|
922
|
+
return value;
|
|
923
|
+
})
|
|
924
|
+
.onSet(async (value) => {
|
|
925
|
+
try {
|
|
926
|
+
deviceData.Device.SetTemperature = value;
|
|
927
|
+
deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
|
|
928
|
+
await this.melCloudAta.send(deviceData);
|
|
929
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature: ${value}${this.accessory.temperatureUnit}`);
|
|
930
|
+
} catch (error) {
|
|
931
|
+
this.emit('warn', `Set cooling threshold temperature error: ${error}`);
|
|
932
|
+
};
|
|
933
|
+
});
|
|
936
934
|
if (modelSupportsHeat) {
|
|
937
935
|
this.melCloudService.getCharacteristic(Characteristic.HeatingThresholdTemperature)
|
|
938
936
|
.setProps({
|
|
@@ -941,7 +939,7 @@ class DeviceAta extends EventEmitter {
|
|
|
941
939
|
minStep: this.accessory.temperatureIncrement
|
|
942
940
|
})
|
|
943
941
|
.onGet(async () => {
|
|
944
|
-
const value = this.accessory.setTemperature;
|
|
942
|
+
const value = this.accessory.operationMode === 1 ? this.accessory.setTemperature : 10;
|
|
945
943
|
return value;
|
|
946
944
|
})
|
|
947
945
|
.onSet(async (value) => {
|
|
@@ -949,7 +947,7 @@ class DeviceAta extends EventEmitter {
|
|
|
949
947
|
if (this.accessory.operationMode === 1) {
|
|
950
948
|
deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
|
|
951
949
|
await this.melCloudAta.send(deviceData);
|
|
952
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set
|
|
950
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set heat temperature: ${value}${this.accessory.temperatureUnit}`);
|
|
953
951
|
};
|
|
954
952
|
|
|
955
953
|
} catch (error) {
|