homebridge-melcloud-control 3.8.3-beta.10 → 3.8.3-beta.12

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 +5 -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.8.3-beta.10",
4
+ "version": "3.8.3-beta.12",
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
@@ -259,9 +259,8 @@ class DeviceAta extends EventEmitter {
259
259
  }
260
260
 
261
261
  //prepare accessory
262
- async prepareAccessory(accountInfo, deviceData, deviceId, deviceTypeText, deviceName, accountName) {
262
+ async prepareAccessory(accountInfo, deviceData, mielHvac, deviceId, deviceTypeText, deviceName, accountName) {
263
263
  try {
264
- const mielHvac = this.mielHvac;
265
264
  const presetsOnServer = mielHvac.presets;
266
265
  const modelSupportsHeat = mielHvac.modelSupportsHeat;
267
266
  const modelSupportsDry = mielHvac.modelSupportsDry;
@@ -997,8 +996,8 @@ class DeviceAta extends EventEmitter {
997
996
  defaultHeatingSetTemperature: deviceData.Device.DefaultHeatingSetTemperature ?? 20,
998
997
  defaultCoolingSetTemperature: deviceData.Device.DefaultCoolingSetTemperature ?? 23,
999
998
  fanSpeed: deviceData.Device.FanSpeed ?? 0,
1000
- currentFanSpeed: 0,
1001
999
  actualFanSpeed: deviceData.Device.ActualFanSpeed,
1000
+ currentFanSpeed: 0,
1002
1001
  automaticFanSpeed: deviceData.Device.AutomaticFanSpeed,
1003
1002
  vaneVerticalSwing: deviceData.Device.VaneVerticalSwing,
1004
1003
  vaneVerticalDirection: deviceData.Device.VaneVerticalDirection,
@@ -1104,8 +1103,8 @@ class DeviceAta extends EventEmitter {
1104
1103
  .updateCharacteristic(Characteristic.CurrentTemperature, obj.roomTemperature)
1105
1104
  .updateCharacteristic(Characteristic.LockPhysicalControls, obj.lockPhysicalControl)
1106
1105
  .updateCharacteristic(Characteristic.TemperatureDisplayUnits, obj.useFahrenheit)
1107
- .updateCharacteristic(Characteristic.CoolingThresholdTemperature, obj.defaultCoolingSetTemperature);
1108
- const updateDefHeat = obj.modelSupportsHeat ? this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, obj.defaultHeatingSetTemperature) : false;
1106
+ .updateCharacteristic(Characteristic.CoolingThresholdTemperature, obj.operationMode === 8 ? obj.defaultCoolingSetTemperature : obj.setTemperature);
1107
+ const updateDefHeat = obj.modelSupportsHeat ? this.melCloudService.updateCharacteristic(Characteristic.HeatingThresholdTemperature, obj.operationMode === 8 ? obj.defaultHeatingSetTemperature : obj.setTemperature) : false;
1109
1108
  const updateRS = obj.modelSupportsFanSpeed ? this.melCloudService.updateCharacteristic(Characteristic.RotationSpeed, obj.currentFanSpeed) : false;
1110
1109
  const updateSM = obj.swingFunction ? this.melCloudService.updateCharacteristic(Characteristic.SwingMode, obj.swingMode) : false;
1111
1110
  };
@@ -1343,7 +1342,7 @@ class DeviceAta extends EventEmitter {
1343
1342
 
1344
1343
  //prepare accessory
1345
1344
  if (this.startPrepareAccessory) {
1346
- const accessory = await this.prepareAccessory(this.accountInfo, deviceData, this.deviceId, this.deviceTypeText, this.deviceName, this.accountName);
1345
+ const accessory = await this.prepareAccessory(this.accountInfo, deviceData, this.mielHvac, this.deviceId, this.deviceTypeText, this.deviceName, this.accountName);
1347
1346
  this.emit('publishAccessory', accessory);
1348
1347
  this.startPrepareAccessory = false;
1349
1348
  }