homebridge-melcloud-control 3.3.21-beta.3 → 3.3.21-beta.5
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 +1 -1
- package/src/melcloudata.js +12 -5
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.21-beta.
|
|
4
|
+
"version": "3.3.21-beta.5",
|
|
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
|
@@ -307,7 +307,7 @@ class DeviceAta extends EventEmitter {
|
|
|
307
307
|
this.accessory.targetOperationMode = this.autoDryFanMode === 3 ? 0 : this.heatDryFanMode === 3 ? 1 : this.coolDryFanMode === 3 ? 2 : this.accessory.targetOperationMode ?? 0;
|
|
308
308
|
break;
|
|
309
309
|
case 8: //AUTO
|
|
310
|
-
this.accessory.currentOperationMode = roomTemperature
|
|
310
|
+
this.accessory.currentOperationMode = roomTemperature > setTemperature ? 3 : roomTemperature < setTemperature ? 2 : 1;
|
|
311
311
|
this.accessory.targetOperationMode = 0;
|
|
312
312
|
break;
|
|
313
313
|
case 9: //ISEE HEAT
|
package/src/melcloudata.js
CHANGED
|
@@ -326,12 +326,11 @@ class MelCloudAta extends EventEmitter {
|
|
|
326
326
|
VaneHorizontalSwing: vaneHorizontalSwing,
|
|
327
327
|
DefaultCoolingSetTemperature: defaultCoolingSetTemperature,
|
|
328
328
|
DefaultHeatingSetTemperature: defaultHeatingSetTemperature,
|
|
329
|
-
|
|
330
|
-
HideVaneControls: hideVaneControls,
|
|
331
|
-
HideDryModeControl: hideDryModeControl,
|
|
329
|
+
ProhibitPower: prohibitPower,
|
|
332
330
|
ProhibitSetTemperature: prohibitSetTemperature,
|
|
333
331
|
ProhibitOperationMode: prohibitOperationMode,
|
|
334
|
-
|
|
332
|
+
HideVaneControls: hideVaneControls,
|
|
333
|
+
HideDryModeControl: hideDryModeControl
|
|
335
334
|
}
|
|
336
335
|
|
|
337
336
|
//check state changes
|
|
@@ -408,6 +407,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
408
407
|
data: {
|
|
409
408
|
DeviceID: deviceData.Device.DeviceID,
|
|
410
409
|
EffectiveFlags: deviceData.Device.EffectiveFlags,
|
|
410
|
+
Power: deviceData.Device.Power,
|
|
411
411
|
SetTemperature: deviceData.Device.SetTemperature,
|
|
412
412
|
SetFanSpeed: deviceData.Device.FanSpeed,
|
|
413
413
|
OperationMode: deviceData.Device.OperationMode,
|
|
@@ -418,7 +418,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
418
418
|
ProhibitSetTemperature: deviceData.Device.ProhibitSetTemperature,
|
|
419
419
|
ProhibitOperationMode: deviceData.Device.ProhibitOperationMode,
|
|
420
420
|
ProhibitPower: deviceData.Device.ProhibitPower,
|
|
421
|
-
Power: deviceData.Device.Power,
|
|
422
421
|
HideVaneControls: deviceData.HideVaneControls,
|
|
423
422
|
HideDryModeControl: deviceData.HideDryModeControl,
|
|
424
423
|
HasPendingCommand: true
|
|
@@ -426,10 +425,18 @@ class MelCloudAta extends EventEmitter {
|
|
|
426
425
|
}
|
|
427
426
|
|
|
428
427
|
await this.axiosInstancePost(CONSTANTS.ApiUrls.SetAta, payload);
|
|
428
|
+
this.updateData(deviceData);
|
|
429
429
|
return true;
|
|
430
430
|
} catch (error) {
|
|
431
431
|
throw new Error(`Send data error: ${error.message || error}`);
|
|
432
432
|
};
|
|
433
433
|
};
|
|
434
|
+
|
|
435
|
+
updateData(deviceData) {
|
|
436
|
+
setTimeout(() => {
|
|
437
|
+
this.emit('externalIntegrations', deviceData);
|
|
438
|
+
this.emit('deviceState', deviceData);
|
|
439
|
+
}, 500);
|
|
440
|
+
}
|
|
434
441
|
};
|
|
435
442
|
module.exports = MelCloudAta;
|