homebridge-melcloud-control 4.1.2-beta.84 → 4.1.2-beta.86
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 +3 -5
- package/src/deviceatw.js +1 -1
- package/src/deviceerv.js +1 -1
- package/src/melcloudata.js +3 -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.1.2-beta.
|
|
4
|
+
"version": "4.1.2-beta.86",
|
|
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
|
@@ -38,7 +38,7 @@ class DeviceAta extends EventEmitter {
|
|
|
38
38
|
this.coolDryFanMode = device.coolDryFanMode || 1; //NONE, COOL, DRY, FAN
|
|
39
39
|
this.autoDryFanMode = device.autoDryFanMode || 1; //NONE, AUTO, DRY, FAN
|
|
40
40
|
this.presets = this.accountType === 'melcloud' ? (device.presets || []).filter(preset => (preset.displayType ?? 0) > 0 && preset.id !== '0') : [];
|
|
41
|
-
this.schedules = this.accountType === 'melcloudhome' ? (device.
|
|
41
|
+
this.schedules = this.accountType === 'melcloudhome' ? (device.shedules || []).filter(schedule => (schedule.displayType ?? 0) > 0 && schedule.id !== '0') : [];
|
|
42
42
|
this.buttons = (device.buttonsSensors || []).filter(sensor => (sensor.displayType ?? 0) > 0);
|
|
43
43
|
this.deviceId = device.id;
|
|
44
44
|
this.deviceName = device.name;
|
|
@@ -751,8 +751,6 @@ class DeviceAta extends EventEmitter {
|
|
|
751
751
|
if (this.logDebug) this.emit('debug', `Prepare schedules services`);
|
|
752
752
|
this.schedulesServices = [];
|
|
753
753
|
this.schedules.forEach((schedule, i) => {
|
|
754
|
-
const scheduleData = schedulesOnServer.find(p => p.Id === schedule.id);
|
|
755
|
-
|
|
756
754
|
//get preset name
|
|
757
755
|
const name = schedule.name;
|
|
758
756
|
|
|
@@ -772,8 +770,8 @@ class DeviceAta extends EventEmitter {
|
|
|
772
770
|
})
|
|
773
771
|
.onSet(async (state) => {
|
|
774
772
|
try {
|
|
775
|
-
deviceData.
|
|
776
|
-
await this.melCloudAta.send(this.accountType, this.displayType, deviceData);
|
|
773
|
+
deviceData.ScheduleEnabled = state;
|
|
774
|
+
await this.melCloudAta.send(this.accountType, this.displayType, deviceData, payload);
|
|
777
775
|
if (this.logInfo) this.emit('info', `${state ? 'Set:' : 'Unset:'} ${name}`);
|
|
778
776
|
} catch (error) {
|
|
779
777
|
if (this.logWarn) this.emit('warn', `Set schedule error: ${error}`);
|
package/src/deviceatw.js
CHANGED
|
@@ -39,7 +39,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
39
39
|
this.temperatureReturnZone2Sensor = device.temperatureReturnZone2Sensor || false;
|
|
40
40
|
this.errorSensor = device.errorSensor || false;
|
|
41
41
|
this.presets = this.accountType === 'melcloud' ? (device.presets || []).filter(preset => (preset.displayType ?? 0) > 0 && preset.id !== '0') : [];
|
|
42
|
-
this.schedules = this.accountType === 'melcloudhome' ? (device.
|
|
42
|
+
this.schedules = this.accountType === 'melcloudhome' ? (device.shedules || []).filter(schedule => (schedule.displayType ?? 0) > 0 && schedule.id !== '0') : [];
|
|
43
43
|
this.buttons = (device.buttonsSensors || []).filter(button => (button.displayType ?? 0) > 0);
|
|
44
44
|
this.deviceId = device.id;
|
|
45
45
|
this.deviceName = device.name;
|
package/src/deviceerv.js
CHANGED
|
@@ -32,7 +32,7 @@ class DeviceErv extends EventEmitter {
|
|
|
32
32
|
this.temperatureSupplySensor = device.temperatureSupplySensor || false;
|
|
33
33
|
this.errorSensor = device.errorSensor || false;
|
|
34
34
|
this.presets = this.accountType === 'melcloud' ? (device.presets || []).filter(preset => (preset.displayType ?? 0) > 0 && preset.id !== '0') : [];
|
|
35
|
-
this.schedules = this.accountType === 'melcloudhome' ? (device.
|
|
35
|
+
this.schedules = this.accountType === 'melcloudhome' ? (device.shedules || []).filter(schedule => (schedule.displayType ?? 0) > 0 && schedule.id !== '0') : [];
|
|
36
36
|
this.buttons = (device.buttonsSensors || []).filter(button => (button.displayType ?? 0) > 0);
|
|
37
37
|
this.deviceId = device.id;
|
|
38
38
|
this.deviceName = device.name;
|
package/src/melcloudata.js
CHANGED
|
@@ -59,7 +59,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
if (this.accountType === 'melcloudhome') {
|
|
64
64
|
deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
|
|
65
65
|
deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
|
|
@@ -210,7 +210,8 @@ class MelCloudAta extends EventEmitter {
|
|
|
210
210
|
SetFanSpeed: String(deviceData.Device.SetFanSpeed),
|
|
211
211
|
OperationMode: AirConditioner.OperationModeMapEnumToString[deviceData.Device.OperationMode],
|
|
212
212
|
VaneHorizontalDirection: AirConditioner.VaneHorizontalDirectionMapEnumToString[deviceData.Device.VaneHorizontalDirection],
|
|
213
|
-
VaneVerticalDirection: AirConditioner.VaneVerticalDirectionMapEnumToString[deviceData.Device.VaneVerticalDirection]
|
|
213
|
+
VaneVerticalDirection: AirConditioner.VaneVerticalDirectionMapEnumToString[deviceData.Device.VaneVerticalDirection],
|
|
214
|
+
ScheduleEnabled: deviceData.ScheduleEnabled
|
|
214
215
|
}
|
|
215
216
|
};
|
|
216
217
|
if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(settings.data, null, 2)}`);
|