homebridge-melcloud-control 3.3.12-beta.17 → 3.3.12-beta.19

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 +9 -6
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.17",
4
+ "version": "3.3.12-beta.19",
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, setTemperature) : 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
  };
@@ -939,17 +939,20 @@ class DeviceAta extends EventEmitter {
939
939
  minStep: this.accessory.temperatureIncrement
940
940
  })
941
941
  .onGet(async () => {
942
- const value = this.accessory.setTemperature;
942
+ const value = this.accessory.operationMode === 1 ? this.accessory.setTemperature : 10;
943
943
  return value;
944
944
  })
945
945
  .onSet(async (value) => {
946
946
  try {
947
- if (this.accessory.operationMode === 1) {
948
- deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
949
- await this.melCloudAta.send(deviceData);
950
- const info = this.disableLogInfo ? false : this.emit('message', `Set heat temperature: ${value}${this.accessory.temperatureUnit}`);
947
+ if (this.accessory.operationMode !== 1) {
948
+ this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, 10)
949
+ return;
951
950
  };
952
951
 
952
+ deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
953
+ await this.melCloudAta.send(deviceData);
954
+ const info = this.disableLogInfo ? false : this.emit('message', `Set heat temperature: ${value}${this.accessory.temperatureUnit}`);
955
+
953
956
  } catch (error) {
954
957
  this.emit('warn', `Set heating threshold temperature error: ${error}`);
955
958
  };