homebridge-melcloud-control 3.3.12-beta.10 → 3.3.12-beta.11
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 +13 -14
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.11",
|
|
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
|
@@ -401,15 +401,15 @@ class DeviceAta extends EventEmitter {
|
|
|
401
401
|
case true:
|
|
402
402
|
switch (operationMode) {
|
|
403
403
|
case 1: //HEAT
|
|
404
|
-
this.accessory.currentOperationMode = 1; //OFF, HEATING, COOLING
|
|
404
|
+
this.accessory.currentOperationMode = roomTemperature > setTemperature ? 0 : 1; //OFF, HEATING, COOLING
|
|
405
405
|
this.accessory.targetOperationMode = 1; //OFF, HEAT, COOL, AUTO
|
|
406
406
|
break;
|
|
407
407
|
case 2: //DRY
|
|
408
|
-
this.accessory.currentOperationMode = 2;
|
|
408
|
+
this.accessory.currentOperationMode = roomTemperature < setTemperature ? 0 : 2;
|
|
409
409
|
this.accessory.targetOperationMode = this.autoDryFanMode === 2 ? 3 : this.heatDryFanMode === 2 ? 1 : this.coolDryFanMode === 2 ? 2 : this.accessory.targetOperationMode;
|
|
410
410
|
break;
|
|
411
411
|
case 3: //COOL
|
|
412
|
-
this.accessory.currentOperationMode = 2;
|
|
412
|
+
this.accessory.currentOperationMode = roomTemperature < setTemperature ? 0 : 2;
|
|
413
413
|
this.accessory.targetOperationMode = 2;
|
|
414
414
|
break;
|
|
415
415
|
case 7: //FAN
|
|
@@ -417,32 +417,31 @@ class DeviceAta extends EventEmitter {
|
|
|
417
417
|
this.accessory.targetOperationMode = this.autoDryFanMode === 3 ? 3 : this.heatDryFanMode === 3 ? 1 : this.coolDryFanMode === 3 ? 2 : this.accessory.targetOperationMode;
|
|
418
418
|
break;
|
|
419
419
|
case 8: //AUTO
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
const heatingToFan = roomTemperature > defaultHeatingSetTemperature + 1;
|
|
420
|
+
switch (this.accessory.currentOperationMode) {
|
|
421
|
+
case 2: //HEATING
|
|
422
|
+
const heatingToFan = roomTemperature > (defaultHeatingSetTemperature + 1);
|
|
424
423
|
this.accessory.currentOperationMode = heatingToFan ? 0 : 1;
|
|
425
424
|
break;
|
|
426
|
-
case
|
|
427
|
-
const coolingToFan = roomTemperature < defaultCoolingSetTemperature - 1;
|
|
428
|
-
this.accessory.currentOperationMode =
|
|
425
|
+
case 3: //COOLING
|
|
426
|
+
const coolingToFan = roomTemperature < (defaultCoolingSetTemperature - 1);
|
|
427
|
+
this.accessory.currentOperationMode = coolingToFan ? 0 : 2;
|
|
429
428
|
break;
|
|
430
429
|
default: //FAN
|
|
431
|
-
this.accessory.currentOperationMode = roomTemperature <= defaultHeatingSetTemperature ? 1 : roomTemperature
|
|
430
|
+
this.accessory.currentOperationMode = roomTemperature >= defaultHeatingSetTemperature && roomTemperature <= defaultCoolingSetTemperature ? 0 : roomTemperature < defaultHeatingSetTemperature ? 1 : roomTemperature > defaultCoolingSetTemperature ? 2 : this.accessory.currentOperationMode;
|
|
432
431
|
break;
|
|
433
432
|
};
|
|
434
433
|
this.accessory.targetOperationMode = 3;
|
|
435
434
|
break;
|
|
436
435
|
case 9: //ISEE HEAT
|
|
437
|
-
this.accessory.currentOperationMode = 1
|
|
436
|
+
this.accessory.currentOperationMode = roomTemperature > setTemperature ? 0 : 1;
|
|
438
437
|
this.accessory.targetOperationMode = 1;
|
|
439
438
|
break;
|
|
440
439
|
case 10: //ISEE DRY
|
|
441
|
-
this.accessory.currentOperationMode = 2;
|
|
440
|
+
this.accessory.currentOperationMode = roomTemperature < setTemperature ? 0 : 2;
|
|
442
441
|
this.accessory.targetOperationMode = this.autoDryFanMode === 2 ? 3 : this.heatDryFanMode === 2 ? 1 : this.coolDryFanMode === 2 ? 2 : this.accessory.targetOperationMode;
|
|
443
442
|
break;
|
|
444
443
|
case 11: //ISEE COOL;
|
|
445
|
-
this.accessory.currentOperationMode = 2;
|
|
444
|
+
this.accessory.currentOperationMode = roomTemperature < setTemperature ? 0 : 2;
|
|
446
445
|
this.accessory.targetOperationMode = 2;
|
|
447
446
|
break;
|
|
448
447
|
default:
|