homebridge-melcloud-control 3.3.7 → 3.3.9
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/deviceatw.js +1 -1
- package/src/deviceerv.js +1 -1
- package/src/melcloud.js +1 -1
- package/src/melcloudata.js +2 -2
- package/src/melcloudatw.js +2 -2
- package/src/melclouderv.js +2 -2
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.
|
|
4
|
+
"version": "3.3.9",
|
|
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
|
@@ -97,7 +97,7 @@ class DeviceAta extends EventEmitter {
|
|
|
97
97
|
this.accessory.targetOperationMode = 0;
|
|
98
98
|
this.accessory.fanSpeed = 0;
|
|
99
99
|
this.accessory.useFahrenheit = useFahrenheit ? 1 : 0;
|
|
100
|
-
this.accessory.temperatureUnit = CONSTANTS.TemperatureDisplayUnits[useFahrenheit];
|
|
100
|
+
this.accessory.temperatureUnit = CONSTANTS.TemperatureDisplayUnits[this.accessory.useFahrenheit];
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
async start() {
|
package/src/deviceatw.js
CHANGED
|
@@ -98,7 +98,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
98
98
|
//accessory
|
|
99
99
|
this.accessory = { zones: [{}, {}, {}, {}] };
|
|
100
100
|
this.accessory.useFahrenheit = useFahrenheit ? 1 : 0;
|
|
101
|
-
this.accessory.temperatureUnit = CONSTANTS.TemperatureDisplayUnits[useFahrenheit];
|
|
101
|
+
this.accessory.temperatureUnit = CONSTANTS.TemperatureDisplayUnits[this.accessory.useFahrenheit];
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
async start() {
|
package/src/deviceerv.js
CHANGED
|
@@ -95,7 +95,7 @@ class DeviceErv extends EventEmitter {
|
|
|
95
95
|
this.accessory.targetOperationMode = 0;
|
|
96
96
|
this.accessory.fanSpeed = 0;
|
|
97
97
|
this.accessory.useFahrenheit = useFahrenheit ? 1 : 0;
|
|
98
|
-
this.accessory.temperatureUnit = CONSTANTS.TemperatureDisplayUnits[useFahrenheit];
|
|
98
|
+
this.accessory.temperatureUnit = CONSTANTS.TemperatureDisplayUnits[this.accessory.useFahrenheit];
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
async start() {
|
package/src/melcloud.js
CHANGED
|
@@ -200,7 +200,7 @@ class MelCloud extends EventEmitter {
|
|
|
200
200
|
};
|
|
201
201
|
|
|
202
202
|
await this.axiosInstancePost(CONSTANTS.ApiUrls.UpdateApplicationOptions, options);
|
|
203
|
-
await this.saveData(this.
|
|
203
|
+
await this.saveData(this.accountFile, accountInfo);
|
|
204
204
|
return true;
|
|
205
205
|
} catch (error) {
|
|
206
206
|
throw new Error(error.message ?? error);
|
package/src/melcloudata.js
CHANGED
|
@@ -46,12 +46,12 @@ class MelCloudAta extends EventEmitter {
|
|
|
46
46
|
try {
|
|
47
47
|
//read device info from file
|
|
48
48
|
const devicesData = await this.readData(this.devicesFile);
|
|
49
|
-
const deviceData = devicesData.find((device) => device.DeviceID === this.deviceId);
|
|
50
49
|
|
|
51
|
-
if (!
|
|
50
|
+
if (!Array.isArray(devicesData)) {
|
|
52
51
|
this.emit('warn', `Device data not found.`);
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
54
|
+
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
55
55
|
const debug = this.debugLog ? this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`) : false;
|
|
56
56
|
|
|
57
57
|
//device info
|
package/src/melcloudatw.js
CHANGED
|
@@ -46,12 +46,12 @@ class MelCloudAtw extends EventEmitter {
|
|
|
46
46
|
try {
|
|
47
47
|
//read device info from file
|
|
48
48
|
const devicesData = await this.readData(this.devicesFile);
|
|
49
|
-
const deviceData = devicesData.find((device) => device.DeviceID === this.deviceId);
|
|
50
49
|
|
|
51
|
-
if (!
|
|
50
|
+
if (!Array.isArray(devicesData)) {
|
|
52
51
|
this.emit('warn', `Device data not found.`);
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
54
|
+
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
55
55
|
const debug = this.debugLog ? this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`) : false;
|
|
56
56
|
|
|
57
57
|
//device info
|
package/src/melclouderv.js
CHANGED
|
@@ -46,12 +46,12 @@ class MelCloudErv extends EventEmitter {
|
|
|
46
46
|
try {
|
|
47
47
|
//read device info from file
|
|
48
48
|
const devicesData = await this.readData(this.devicesFile);
|
|
49
|
-
const deviceData = devicesData.find((device) => device.DeviceID === this.deviceId);
|
|
50
49
|
|
|
51
|
-
if (!
|
|
50
|
+
if (!Array.isArray(devicesData)) {
|
|
52
51
|
this.emit('warn', `Device data not found.`);
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
54
|
+
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
55
55
|
const debug = this.debugLog ? this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`) : false;
|
|
56
56
|
|
|
57
57
|
//deviceData
|