homebridge-melcloud-control 4.0.0-beta.171 → 4.0.0-beta.173
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.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.173",
|
|
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
|
@@ -55,14 +55,15 @@ class MelCloudAta extends EventEmitter {
|
|
|
55
55
|
}
|
|
56
56
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
57
57
|
if (this.accountType === 'melcloudhome') {
|
|
58
|
+
deviceData.SerialNumber = deviceData.Device.DeviceID || '4.0.0';
|
|
58
59
|
deviceData.Device.OperationMode = AirConditioner.OperationModeMapStringToEnum[deviceData.Device.OperationMode];
|
|
59
60
|
deviceData.Device.ActualFanSpeed = AirConditioner.FanSpeedMapStringToEnum[deviceData.Device.ActualFanSpeed];
|
|
61
|
+
deviceData.Device.SetFanSpeed = AirConditioner.FanSpeedMapStringToEnum[deviceData.Device.SetFanSpeed] ?? deviceData.Device.SetFanSpeed;
|
|
60
62
|
deviceData.Device.VaneVerticalDirection = AirConditioner.VaneVerticalDirectionMapStringToEnum[deviceData.Device.VaneVerticalDirection];
|
|
61
63
|
deviceData.Device.VaneHorizontalDirection = AirConditioner.VaneHorizontalDirectionMapStringToEnum[deviceData.Device.VaneHorizontalDirection];
|
|
62
64
|
deviceData.Device.DefaultHeatingSetTemperature = 20;
|
|
63
65
|
deviceData.Device.DefaultCoolingSetTemperature = 23;
|
|
64
66
|
deviceData.Device.FirmwareAppVersion = '4.0.0';
|
|
65
|
-
deviceData.SerialNumber = deviceData.Device.DeviceID || '4.0.0';
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
if (!this.logDebug) this.emit('warn', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
|
|
@@ -241,6 +242,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
241
242
|
return true;
|
|
242
243
|
case "melcloudhome":
|
|
243
244
|
const axiosInstancePut = axios.create({
|
|
245
|
+
method: 'PUT',
|
|
244
246
|
baseURL: ApiUrlsHome.BaseURL,
|
|
245
247
|
timeout: 25000,
|
|
246
248
|
headers: {
|
|
@@ -283,7 +285,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
283
285
|
this.emit('warn', JSON.stringify(data, null, 2));
|
|
284
286
|
|
|
285
287
|
const path = ApiUrlsHome.SetAta.replace('deviceid', deviceData.DeviceID);
|
|
286
|
-
await axiosInstancePut
|
|
288
|
+
await axiosInstancePut(path, data);
|
|
287
289
|
return true;
|
|
288
290
|
default:
|
|
289
291
|
return;
|