homebridge-melcloud-control 3.3.12-beta.25 → 3.3.12-beta.26

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "3.3.12-beta.25",
4
+ "version": "3.3.12-beta.26",
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
@@ -374,8 +374,8 @@ class DeviceAta extends EventEmitter {
374
374
  .updateCharacteristic(Characteristic.TargetHeaterCoolerState, this.accessory.targetOperationMode)
375
375
  .updateCharacteristic(Characteristic.CurrentTemperature, roomTemperature)
376
376
  .updateCharacteristic(Characteristic.LockPhysicalControls, this.accessory.lockPhysicalControl)
377
- .updateCharacteristic(Characteristic.TemperatureDisplayUnits, this.accessory.useFahrenheit);
378
- const updateDefCool = modelSupportsCool ? this.melCloudService.updateCharacteristic(Characteristic.CoolingThresholdTemperature, setTemperature) : false;
377
+ .updateCharacteristic(Characteristic.TemperatureDisplayUnits, this.accessory.useFahrenheit)
378
+ .updateCharacteristic(Characteristic.CoolingThresholdTemperature, setTemperature);
379
379
  const updateDefHeat = modelSupportsHeat ? this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, this.accessory.targetOperationMode !== 1 ? 10 : 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;
@@ -937,7 +937,7 @@ class DeviceAta extends EventEmitter {
937
937
 
938
938
  deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
939
939
  await this.melCloudAta.send(deviceData);
940
- const info = this.disableLogInfo ? false : this.emit('message', `Set heat temperature: ${value}${this.accessory.temperatureUnit}`);
940
+ const info = this.disableLogInfo ? false : this.emit('message', `Set temperature: ${value}${this.accessory.temperatureUnit}`);
941
941
  } catch (error) {
942
942
  this.emit('warn', `Set heating threshold temperature error: ${error}`);
943
943
  };
package/src/deviceerv.js CHANGED
@@ -354,8 +354,8 @@ class DeviceErv extends EventEmitter {
354
354
  .updateCharacteristic(Characteristic.RotationSpeed, this.accessory.fanSpeed)
355
355
  .updateCharacteristic(Characteristic.LockPhysicalControls, this.accessory.lockPhysicalControl)
356
356
  .updateCharacteristic(Characteristic.TemperatureDisplayUnits, this.accessory.useFahrenheit);
357
- const updateDefHeat = hasHeatOperationMode ? this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, ventilationMode === 2 ? defaultHeatingSetTemperature : setTemperature) : false;
358
- const updateDefCool = hasCoolOperationMode ? this.melCloudService.updateCharacteristic(Characteristic.CoolingThresholdTemperature, ventilationMode === 2 ? defaultCoolingSetTemperature : setTemperature) : false;
357
+ const updateDefCool = hasCoolOperationMode ? this.melCloudService.updateCharacteristic(Characteristic.CoolingThresholdTemperature, setTemperature) : false;
358
+ const updateDefHeat = hasHeatOperationMode ? this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, ventilationMode !== 2 ? 10 : setTemperature) : false;
359
359
  };
360
360
  break;
361
361
  case 2: //Thermostat
@@ -798,22 +798,15 @@ class DeviceErv extends EventEmitter {
798
798
  minStep: this.accessory.temperatureIncrement
799
799
  })
800
800
  .onGet(async () => {
801
- const value = this.accessorydefaultCoolingSetTemperature;
801
+ const value = this.accessory.setTemperature;
802
802
  return value;
803
803
  })
804
804
  .onSet(async (value) => {
805
805
  try {
806
- switch (this.accessory.ventilationMode) {
807
- case 2: //AUTO - AUTO
808
- deviceData.Device.DefaultCoolingSetTemperature = value;
809
- break;
810
- default:
811
- deviceData.Device.SetTemperature = value;
812
- break
813
- };
814
- deviceData.Device.EffectiveFlags = CONSTANTS.Ventilation.EffectiveFlags.SetTemperature;
806
+ deviceData.Device.SetTemperature = value;
807
+ deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
815
808
  await this.melCloudErv.send(deviceData);
816
- const info = this.disableLogInfo ? false : this.emit('message', `Set cooling threshold temperature: ${value}${this.accessory.temperatureUnit}`);
809
+ const info = this.disableLogInfo ? false : this.emit('message', `Set temperature: ${value}${this.accessory.temperatureUnit}`);
817
810
  } catch (error) {
818
811
  this.emit('warn', `Set cooling threshold temperature error: ${error}`);
819
812
  };
@@ -828,22 +821,19 @@ class DeviceErv extends EventEmitter {
828
821
  minStep: this.accessory.temperatureIncrement
829
822
  })
830
823
  .onGet(async () => {
831
- const value = this.accessory.defaultHeatingSetTemperature;
824
+ const value = this.accessory.targetOperationMode !== 1 ? 10 : this.accessory.setTemperature;
832
825
  return value;
833
826
  })
834
827
  .onSet(async (value) => {
835
828
  try {
836
- switch (this.accessory.ventilationMode) {
837
- case 2: //AUTO - AUTO
838
- deviceData.Device.DefaultHeatingSetTemperature = value;
839
- break;
840
- default:
841
- deviceData.Device.SetTemperature = value;
842
- break
829
+ if (this.accessory.targetOperationMode !== 1) {
830
+ this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, 10)
831
+ return;
843
832
  };
844
- deviceData.Device.EffectiveFlags = CONSTANTS.Ventilation.EffectiveFlags.SetTemperature;
833
+
834
+ deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
845
835
  await this.melCloudErv.send(deviceData);
846
- const info = this.disableLogInfo ? false : this.emit('message', `Set heating threshold temperature: ${value}${this.accessory.temperatureUnit}`);
836
+ const info = this.disableLogInfo ? false : this.emit('message', `Set temperature: ${value}${this.accessory.temperatureUnit}`);
847
837
  } catch (error) {
848
838
  this.emit('warn', `Set heating threshold temperature error: ${error}`);
849
839
  };