homebridge-melcloud-control 4.1.2-beta.30 → 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.
@@ -586,7 +586,7 @@
586
586
  "name": {
587
587
  "title": "Name",
588
588
  "type": "string",
589
- "default": "Preset",
589
+ "default": "Schedule",
590
590
  "description": "Your own name displayed in Homebridge/HomeKit app.",
591
591
  "condition": {
592
592
  "functionBody": "return model.accounts[arrayIndices[0]].ataDevices[arrayIndices[1]].schedules[arrayIndices[2]].displayType > 0;"
@@ -1283,7 +1283,7 @@
1283
1283
  "name": {
1284
1284
  "title": "Name",
1285
1285
  "type": "string",
1286
- "default": "Preset",
1286
+ "default": "Schedule",
1287
1287
  "description": "Your own name displayed in Homebridge/HomeKit app.",
1288
1288
  "condition": {
1289
1289
  "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].schedules[arrayIndices[2]].displayType > 0;"
@@ -290,19 +290,19 @@
290
290
  }
291
291
 
292
292
  if (account.type === 'melcloudhome') {
293
- const schedule = device.Schedule || [];
294
- schedule.forEach((preset, index) => {
295
- const presetObj = {
296
- id: preset.Id,
293
+ const schedules = device.Schedule || [];
294
+ schedules.forEach((schedule, index) => {
295
+ const scheduleObj = {
296
+ id: schedule.Id,
297
297
  displayType: 0,
298
298
  name: `Schedule ${index}`,
299
299
  namePrefix: false
300
300
  };
301
301
 
302
302
  const deviceInConfig = devicesInConfig.find(dev => String(dev.id) === deviceObj.id);
303
- if (deviceInConfig && !deviceInConfig.presets.some(pres => String(pres.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.30",
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",