homebridge-melcloud-control 4.1.2-beta.84 → 4.1.2-beta.85

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.1.2-beta.84",
4
+ "version": "4.1.2-beta.85",
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
@@ -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.Schedule = state;
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}`);
@@ -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)}`);