homebridge-melcloud-control 3.3.21-beta.3 → 3.3.21-beta.4
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 +10 -12
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.4",
|
|
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,29 +326,26 @@ 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
|
|
338
|
-
const
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
this.deviceState = deviceState;
|
|
337
|
+
const deviceStateHasNotChanged = JSON.stringify(deviceState) === JSON.stringify(this.deviceState);
|
|
338
|
+
this.deviceState = deviceStateHasNotChanged ? this.deviceState : deviceState;
|
|
339
|
+
this.deviceData = deviceStateHasNotChanged ? this.deviceData : deviceData;
|
|
343
340
|
|
|
344
341
|
//external integrations
|
|
345
|
-
this.emit('externalIntegrations', deviceData);
|
|
342
|
+
this.emit('externalIntegrations', this.deviceData);
|
|
346
343
|
|
|
347
344
|
//emit info
|
|
348
345
|
this.emit('deviceInfo', manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion);
|
|
349
346
|
|
|
350
347
|
//emit state
|
|
351
|
-
this.emit('deviceState', deviceData);
|
|
348
|
+
this.emit('deviceState', this.deviceData);
|
|
352
349
|
|
|
353
350
|
return true;
|
|
354
351
|
} catch (error) {
|
|
@@ -408,6 +405,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
408
405
|
data: {
|
|
409
406
|
DeviceID: deviceData.Device.DeviceID,
|
|
410
407
|
EffectiveFlags: deviceData.Device.EffectiveFlags,
|
|
408
|
+
Power: deviceData.Device.Power,
|
|
411
409
|
SetTemperature: deviceData.Device.SetTemperature,
|
|
412
410
|
SetFanSpeed: deviceData.Device.FanSpeed,
|
|
413
411
|
OperationMode: deviceData.Device.OperationMode,
|
|
@@ -418,7 +416,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
418
416
|
ProhibitSetTemperature: deviceData.Device.ProhibitSetTemperature,
|
|
419
417
|
ProhibitOperationMode: deviceData.Device.ProhibitOperationMode,
|
|
420
418
|
ProhibitPower: deviceData.Device.ProhibitPower,
|
|
421
|
-
Power: deviceData.Device.Power,
|
|
422
419
|
HideVaneControls: deviceData.HideVaneControls,
|
|
423
420
|
HideDryModeControl: deviceData.HideDryModeControl,
|
|
424
421
|
HasPendingCommand: true
|
|
@@ -426,6 +423,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
426
423
|
}
|
|
427
424
|
|
|
428
425
|
await this.axiosInstancePost(CONSTANTS.ApiUrls.SetAta, payload);
|
|
426
|
+
this.deviceData = deviceData;
|
|
429
427
|
return true;
|
|
430
428
|
} catch (error) {
|
|
431
429
|
throw new Error(`Send data error: ${error.message || error}`);
|