homebridge-melcloud-control 4.10.10 → 4.10.11-beta.1

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 +1 -4
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.10.10",
4
+ "version": "4.10.11-beta.1",
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
@@ -393,13 +393,10 @@ class DeviceAta extends EventEmitter {
393
393
  })
394
394
  .onSet(async (value) => {
395
395
  try {
396
- const payload = {};
397
- const fanKeySet = accountTypeMelCloud ? 'fanSpeed' : 'setFanSpeed';
398
396
  const max = numberOfFanSpeeds;
399
397
  const minValue = supportsAutomaticFanSpeed ? 0 : 1;
400
398
  const clampedValue = Math.min(Math.max(value, minValue), max);
401
-
402
- payload[fanKeySet] = clampedValue;
399
+ const payload = { setFanSpeed: clampedValue };
403
400
  if (this.logInfo) this.emit('info', `Set fan speed mode: ${AirConditioner.FanSpeedMapEnumToString[clampedValue]}`);
404
401
  await this.melCloudAta.send(this.accountType, this.displayType, deviceData, payload, AirConditioner.EffectiveFlags.SetFanSpeed);
405
402
  } catch (error) {