homebridge-melcloud-control 4.1.2-beta.31 → 4.1.2-beta.32

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.
@@ -290,9 +290,9 @@
290
290
  }
291
291
 
292
292
  if (account.type === 'melcloudhome') {
293
- const schedule = device.Schedule || [];
294
- schedule.forEach((schedule, index) => {
295
- const presetObj = {
293
+ const schedules = device.Schedule || [];
294
+ schedules.forEach((schedule, index) => {
295
+ const scheduleObj = {
296
296
  id: schedule.Id,
297
297
  displayType: 0,
298
298
  name: `Schedule ${index}`,
@@ -300,9 +300,9 @@
300
300
  };
301
301
 
302
302
  const deviceInConfig = devicesInConfig.find(dev => String(dev.id) === deviceObj.id);
303
- if (deviceInConfig && !deviceInConfig.schedules.some(sched => String(sched.id) === presetObj.id)) {
304
- deviceInConfig.schedules.push(presetObj);
305
- newPresets.push(presetObj);
303
+ if (deviceInConfig && !deviceInConfig.schedules.some(sched => String(sched.id) === scheduleObj.id)) {
304
+ deviceInConfig.schedules.push(scheduleObj);
305
+ newPresets.push(scheduleObj);
306
306
  }
307
307
  });
308
308
  }
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.31",
4
+ "version": "4.1.2-beta.32",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",