homebridge-melcloud-control 4.4.0-beta.3 → 4.4.0-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/melcloudata.js +7 -0
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.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/melcloudata.js
CHANGED
|
@@ -309,6 +309,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
309
309
|
//send payload
|
|
310
310
|
if (this.logDebug) this.emit('debug', `Send data: ${JSON.stringify(payload, null, 2)}`);
|
|
311
311
|
await this.client(path, { method: method, data: payload });
|
|
312
|
+
this.update(deviceData);
|
|
312
313
|
|
|
313
314
|
return true;
|
|
314
315
|
default:
|
|
@@ -318,6 +319,12 @@ class MelCloudAta extends EventEmitter {
|
|
|
318
319
|
throw new Error(`Send data error: ${error.message}`);
|
|
319
320
|
}
|
|
320
321
|
}
|
|
322
|
+
|
|
323
|
+
update(deviceData) {
|
|
324
|
+
setTimeout(() => {
|
|
325
|
+
this.emit('deviceState', deviceData)
|
|
326
|
+
}, 500);
|
|
327
|
+
}
|
|
321
328
|
}
|
|
322
329
|
|
|
323
330
|
export default MelCloudAta;
|