homebridge-melcloud-control 4.3.8-beta.1 → 4.3.8-beta.2

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.
Files changed (2) hide show
  1. package/index.js +8 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -131,25 +131,26 @@ class MelCloudPlatform {
131
131
  if (logLevel.debug) log.info(`${accountName}, found configured devices ATA: ${ataDevices.length}, ATW: ${atwDevices.length}, ERV: ${ervDevices.length}.`);
132
132
 
133
133
  for (const [index, device] of devices.entries()) {
134
- //chack device from config exist on melcloud
134
+ device.id = String(device.id);
135
+ const deviceName = device.name;
136
+ const deviceType = device.type;
137
+ const deviceTypeString = device.typeString;
138
+ const defaultTempsFile = `${prefDir}/${accountName}_${device.id}_Temps`;
139
+
140
+ //chack device is not disabled in config
135
141
  const displayType = device.displayType > 0;
136
142
  if (!displayType) {
137
143
  if (logLevel.warn) log.warn(`${accountName}, ${deviceTypeString}, ${deviceName} disabled in config, will not be published in Home app.`);
138
144
  continue;
139
145
  }
140
146
 
141
- device.id = String(device.id);
147
+ //chack device from config exist on melcloud
142
148
  const deviceExistInMelCloud = melcloudDevicesList.Devices.some(dev => dev.DeviceID === device.id);
143
149
  if (!deviceExistInMelCloud) {
144
150
  if (logLevel.warn) log.warn(`${accountName}, ${deviceTypeString}, ${deviceName} not exist in MELCLoud, please login to MELCLoud from plugin UI to correct this issue.`);
145
151
  continue;
146
152
  }
147
153
 
148
- const deviceName = device.name;
149
- const deviceType = device.type;
150
- const deviceTypeString = device.typeString;
151
- const defaultTempsFile = `${prefDir}/${accountName}_${device.id}_Temps`;
152
-
153
154
  // set rest ful port
154
155
  account.restFul.port = (device.id).slice(-4).replace(/^0/, '9');
155
156
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.3.8-beta.1",
4
+ "version": "4.3.8-beta.2",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",