homebridge-melcloud-control 4.4.1-beta.0 → 4.4.1-beta.1

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 +4 -12
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -31,17 +31,9 @@ class MelCloudPlatform {
31
31
  api.on('didFinishLaunching', async () => {
32
32
  //loop through accounts
33
33
  for (const account of config.accounts) {
34
- const accountType = account.type || 'disabled';
35
- if (accountType === 'disabled') continue;
36
-
37
- const accountName = account.name;
38
- const user = account.user;
39
- const passwd = account.passwd;
40
- const language = account.language;
41
-
42
- //check mandatory properties
43
- if (!accountName || accountsName.includes(accountName) || !user || !passwd || !language) {
44
- log.warn(`Account name: ${accountName ? accountsName.includes(accountName) ? 'Duplicated' : 'OK' : accountName}, user: ${user ? 'OK' : user}, password: ${passwd ? 'OK' : passwd}, language: ${language ? 'OK' : language} in config missing.`);
34
+ const { accountName, user, passwd, language, displayType } = account;
35
+ if (!accountName || accountsName.includes(accountName) || !user || !passwd || !language || !displayType) {
36
+ log.warn(`Account ${!accountName ? 'name missing' : (accountsName.includes(accountName) ? 'name duplicated' : accountName)} ${user ? ', user missing' : ''}${passwd ? '' : ', password missing'},${language ? '' : ', language missing'}${!displayType ? ', type disabled' : ''} in config, will not be published in the Home app`);
45
37
  continue;
46
38
  }
47
39
  accountsName.push(accountName);
@@ -138,7 +130,7 @@ class MelCloudPlatform {
138
130
  const defaultTempsFile = `${prefDir}/${accountName}_${device.id}_Temps`;
139
131
 
140
132
  //chack device is not disabled in config
141
- const displayType = device.displayType > 0;
133
+ const displayType = device.displayType;
142
134
  if (!displayType) {
143
135
  if (logLevel.warn) log.warn(`${accountName}, ${deviceTypeString}, ${deviceName}, disabled in configuration, will not be published in the Home app.`);
144
136
  continue;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.4.1-beta.0",
4
+ "version": "4.4.1-beta.1",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",