homebridge-melcloud-control 3.3.12-beta.16 → 3.3.12-beta.17
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 +22 -24
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.17",
|
|
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,7 +375,7 @@ 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,
|
|
378
|
+
const updateDefHeat = modelSupportsHeat ? this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, setTemperature) : false;
|
|
379
379
|
const updateDefCool = modelSupportsCool ? this.melCloudService.updateCharacteristic(Characteristic.CoolingThresholdTemperature, setTemperature) : 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;
|
|
@@ -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({
|
|
@@ -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) {
|