homebridge-melcloud-control 4.0.0-beta.144 → 4.0.0-beta.145
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 +4 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.145",
|
|
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
|
@@ -288,8 +288,11 @@ class DeviceAta extends EventEmitter {
|
|
|
288
288
|
return state;
|
|
289
289
|
})
|
|
290
290
|
.onSet(async (state) => {
|
|
291
|
+
state = state ? true : false;
|
|
292
|
+
if (state === deviceData.Device.Power) return;
|
|
293
|
+
|
|
291
294
|
try {
|
|
292
|
-
deviceData.Device.Power =
|
|
295
|
+
deviceData.Device.Power = state
|
|
293
296
|
deviceData.Device.EffectiveFlags = AirConditioner.EffectiveFlags.Power;
|
|
294
297
|
await this.melCloudAta.send(this.accountType, deviceData, this.displayMode);
|
|
295
298
|
if (this.logInfo) this.emit('info', `Set power: ${state ? 'ON' : 'OFF'}`);
|