homebridge-melcloud-control 4.4.0-beta.20 → 4.4.0-beta.21
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/melcloudata.js +4 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.4.0-beta.
|
|
4
|
+
"version": "4.4.0-beta.21",
|
|
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/melcloudata.js
CHANGED
|
@@ -199,6 +199,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
199
199
|
let method = null
|
|
200
200
|
let payload = {};
|
|
201
201
|
let path = '';
|
|
202
|
+
let update = false;
|
|
202
203
|
switch (accountType) {
|
|
203
204
|
case "melcloud":
|
|
204
205
|
switch (flag) {
|
|
@@ -251,7 +252,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
251
252
|
};
|
|
252
253
|
method = 'POST';
|
|
253
254
|
path = ApiUrlsHome.PostProtectionFrost;
|
|
254
|
-
|
|
255
|
+
update = true;
|
|
255
256
|
break;
|
|
256
257
|
case 'overheatprotection':
|
|
257
258
|
payload = {
|
|
@@ -262,7 +263,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
262
263
|
};
|
|
263
264
|
method = 'POST';
|
|
264
265
|
path = ApiUrlsHome.PostProtectionOverheat;
|
|
265
|
-
|
|
266
|
+
update = true;
|
|
266
267
|
break;
|
|
267
268
|
case 'holidaymode':
|
|
268
269
|
payload = {
|
|
@@ -314,6 +315,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
314
315
|
//send payload
|
|
315
316
|
if (this.logDebug) this.emit('debug', `Send data: ${JSON.stringify(payload, null, 2)}`);
|
|
316
317
|
await this.client(path, { method: method, data: payload });
|
|
318
|
+
if (update) this.update(deviceData);
|
|
317
319
|
|
|
318
320
|
return true;
|
|
319
321
|
default:
|