homebridge-melcloud-control 4.2.3-beta.46 → 4.2.3-beta.47

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.
@@ -646,7 +646,7 @@
646
646
  "name": {
647
647
  "title": "Name",
648
648
  "type": "string",
649
- "default": "Schedule",
649
+ "default": "Scene",
650
650
  "description": "Your own name displayed in Homebridge/HomeKit app.",
651
651
  "condition": {
652
652
  "functionBody": "return model.accounts[arrayIndices[0]].ataDevices[arrayIndices[1]].scenes[arrayIndices[2]].displayType > 0;"
@@ -1421,7 +1421,7 @@
1421
1421
  "name": {
1422
1422
  "title": "Name",
1423
1423
  "type": "string",
1424
- "default": "Schedule",
1424
+ "default": "Scene",
1425
1425
  "description": "Your own name displayed in Homebridge/HomeKit app.",
1426
1426
  "condition": {
1427
1427
  "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].scenes[arrayIndices[2]].displayType > 0;"
@@ -1978,7 +1978,7 @@
1978
1978
  "name": {
1979
1979
  "title": "Name",
1980
1980
  "type": "string",
1981
- "default": "Schedule",
1981
+ "default": "Scene",
1982
1982
  "description": "Your own name displayed in Homebridge/HomeKit app.",
1983
1983
  "condition": {
1984
1984
  "functionBody": "return model.accounts[arrayIndices[0]].ervDevices[arrayIndices[1]].scenes[arrayIndices[2]].displayType > 0;"
@@ -331,14 +331,14 @@
331
331
 
332
332
  // === Process scenes ===
333
333
  const scenes = device.Scenes || [];
334
- const scenesInConfig = deviceInConfig.Scenes || [];
335
- const scenesIds = new Set(scenesInConfig.map(s => String(s.id)));
334
+ const scenesInConfig = deviceInConfig.scenes || [];
335
+ const sceneIds = new Set(scenesInConfig.map(s => String(s.id)));
336
336
 
337
337
  let addedNewScenes = false;
338
338
 
339
339
  scenes.forEach((scene, index) => {
340
- const sceneId = String(scene.id);
341
- if (!scenesIds.has(sceneId)) {
340
+ const sceneId = String(scene.Id);
341
+ if (!sceneIds.has(sceneId)) {
342
342
  const sceneObj = {
343
343
  id: sceneId,
344
344
  displayType: 0,
@@ -347,7 +347,7 @@
347
347
  };
348
348
  scenesInConfig.push(sceneObj);
349
349
  newScenes.push(sceneObj);
350
- scenesIds.add(sceneObj);
350
+ sceneIds.add(sceneObj);
351
351
  addedNewScenes = true;
352
352
  }
353
353
  });
@@ -355,8 +355,8 @@
355
355
  // === Remove placeholder scenes (id === '0') if new ones were added ===
356
356
  if (addedNewScenes) {
357
357
  const beforeCount = scenesInConfig.length;
358
- deviceInConfig.Scenes = scenesInConfig.filter(s => String(s.id) !== '0');
359
- const removedCount = beforeCount - deviceInConfig.Scenes.length;
358
+ deviceInConfig.scenes = scenesInConfig.filter(s => String(s.id) !== '0');
359
+ const removedCount = beforeCount - deviceInConfig.scenes.length;
360
360
 
361
361
  if (removedCount > 0 && removedCount < beforeCount) {
362
362
  updateInfo('info2', `Removed ${removedCount} placeholder scene from device ${device.DeviceID}`, 'yellow');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.2.3-beta.46",
4
+ "version": "4.2.3-beta.47",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",