homebridge-melcloud-control 4.0.0-beta.131 → 4.0.0-beta.133
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/constants.js +2 -0
- package/src/deviceata.js +2 -0
- package/src/melcloudata.js +1 -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.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.133",
|
|
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/constants.js
CHANGED
|
@@ -78,6 +78,8 @@ export const AirConditioner = {
|
|
|
78
78
|
OperationModeMapEnumToString: { 0: "0", 1: "Heat", 2: "Dry", 3: "Cool", 4: "4", 5: "5", 6: "6", 7: "Fan", 8: "Auto", 9: "Isee Heat", 10: "Isee Dry", 11: "Isee Cool" },
|
|
79
79
|
FanSpeedMapStringToEnum: { "Auto": 0, "One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5, },
|
|
80
80
|
FanSpeedMapEnumToString: { 0: "Auto", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five" },
|
|
81
|
+
VaneVerticalDirectionMapStringToEnum: { "Auto": 0, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "Swing": 7 },
|
|
82
|
+
VaneHorizontalDirectionMapStringToEnum: { "Auto": 0, "LL": 1, "L": 2, "C": 3, "R": 4, "RR": 5, "6": 6, "7": 7, "Split": 8, "9": 9, "10": 10, "11": 11, "Swing": 12 },
|
|
81
83
|
};
|
|
82
84
|
|
|
83
85
|
export const HeatPump = {
|
package/src/deviceata.js
CHANGED
|
@@ -948,6 +948,8 @@ class DeviceAta extends EventEmitter {
|
|
|
948
948
|
})
|
|
949
949
|
.on('deviceState', async (deviceData) => {
|
|
950
950
|
if (this.accountType === 'melcloudhome') deviceData.Device.OperationMode = AirConditioner.OperationModeMapStringToEnum[deviceData.Device.OperationMode];
|
|
951
|
+
if (this.accountType === 'melcloudhome') deviceData.Device.VaneVerticalDirection = AirConditioner.VaneVerticalDirectionMapStringToEnum[deviceData.Device.VaneVerticalDirection];
|
|
952
|
+
if (this.accountType === 'melcloudhome') deviceData.Device.VaneHorizontalDirection = AirConditioner.VaneHorizontalDirectionMapStringToEnum[deviceData.Device.VaneHorizontalDirection];
|
|
951
953
|
this.deviceData = deviceData;
|
|
952
954
|
|
|
953
955
|
//presets
|
package/src/melcloudata.js
CHANGED
|
@@ -332,8 +332,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
332
332
|
this.emit('warn', JSON.stringify(payload, null, 2));
|
|
333
333
|
|
|
334
334
|
const path = ApiUrlsHome.SetAta.replace('deviceid', deviceData.DeviceID);
|
|
335
|
-
|
|
336
|
-
this.emit('warn', JSON.stringify(response, null, 2));
|
|
335
|
+
await axiosInstancePut(path, payload);
|
|
337
336
|
return true;
|
|
338
337
|
} catch (error) {
|
|
339
338
|
throw new Error(`Send data error: ${error}`);
|