homebridge-melcloud-control 2.5.0-beta.35 → 2.5.0-beta.37

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.
@@ -223,12 +223,6 @@
223
223
  "default": 0,
224
224
  "required": true
225
225
  },
226
- "type": {
227
- "title": "Type",
228
- "type": "integer",
229
- "default": 0,
230
- "required": true
231
- },
232
226
  "displayMode": {
233
227
  "title": "Control",
234
228
  "type": "integer",
@@ -1582,39 +1576,6 @@
1582
1576
  "type": "password"
1583
1577
  },
1584
1578
  "accounts[].language",
1585
- {
1586
- "key": "accounts[].devicesAta",
1587
- "type": "tabarray",
1588
- "title": "{{ value.name }}",
1589
- "items": [
1590
- "accounts[].devicesAta[].name",
1591
- "accounts[].devicesAta[].id",
1592
- "accounts[].devicesAta[].type",
1593
- "accounts[].devicesAta[].displayMode"
1594
- ]
1595
- },
1596
- {
1597
- "key": "accounts[].devicesAtw",
1598
- "type": "tabarray",
1599
- "title": "{{ value.name }}",
1600
- "items": [
1601
- "accounts[].devicesAtw[].name",
1602
- "accounts[].devicesAtw[].id",
1603
- "accounts[].devicesAtw[].type",
1604
- "accounts[].devicesAtw[].displayMode"
1605
- ]
1606
- },
1607
- {
1608
- "key": "accounts[].devicesErv",
1609
- "type": "tabarray",
1610
- "title": "{{ value.name }}",
1611
- "items": [
1612
- "accounts[].devicesAtw[].name",
1613
- "accounts[].devicesAtw[].id",
1614
- "accounts[].devicesAtw[].type",
1615
- "accounts[].devicesAtw[].displayMode"
1616
- ]
1617
- },
1618
1579
  {
1619
1580
  "key": "accounts[]",
1620
1581
  "type": "section",
@@ -1631,6 +1592,17 @@
1631
1592
  "key": "accounts[]",
1632
1593
  "title": "Air Conditioner",
1633
1594
  "items": [
1595
+ {
1596
+ "key": "accounts[].devicesAta",
1597
+ "type": "tabarray",
1598
+ "title": "{{ value.name }}",
1599
+ "items": [
1600
+ "accounts[].devicesAta[].name",
1601
+ "accounts[].devicesAta[].id",
1602
+ "accounts[].devicesAta[].type",
1603
+ "accounts[].devicesAta[].displayMode"
1604
+ ]
1605
+ },
1634
1606
  "accounts[].ataDisplayMode",
1635
1607
  "accounts[].ataPresets",
1636
1608
  {
@@ -1700,6 +1672,17 @@
1700
1672
  "key": "accounts[]",
1701
1673
  "title": "Heat Pump",
1702
1674
  "items": [
1675
+ {
1676
+ "key": "accounts[].devicesAtw",
1677
+ "type": "tabarray",
1678
+ "title": "{{ value.name }}",
1679
+ "items": [
1680
+ "accounts[].devicesAtw[].name",
1681
+ "accounts[].devicesAtw[].id",
1682
+ "accounts[].devicesAtw[].type",
1683
+ "accounts[].devicesAtw[].displayMode"
1684
+ ]
1685
+ },
1703
1686
  "accounts[].atwDisplayMode",
1704
1687
  "accounts[].atwPresets",
1705
1688
  {
@@ -1764,6 +1747,17 @@
1764
1747
  "key": "accounts[]",
1765
1748
  "title": "Energy Recovery Ventilation",
1766
1749
  "items": [
1750
+ {
1751
+ "key": "accounts[].devicesErv",
1752
+ "type": "tabarray",
1753
+ "title": "{{ value.name }}",
1754
+ "items": [
1755
+ "accounts[].devicesErv[].name",
1756
+ "accounts[].devicesErv[].id",
1757
+ "accounts[].devicesErv[].type",
1758
+ "accounts[].devicesErv[].displayMode"
1759
+ ]
1760
+ },
1767
1761
  "accounts[].ervDisplayMode",
1768
1762
  "accounts[].ervPresets",
1769
1763
  {
@@ -147,6 +147,9 @@
147
147
  const info = response.info ?? '';
148
148
  const status = response.status;
149
149
  const devices = response.data ?? [];
150
+ const typeAta = [];
151
+ const typeAtw = [];
152
+ const typeErv = [];
150
153
 
151
154
  switch (status) {
152
155
  case 0:
@@ -160,13 +163,16 @@
160
163
  const deviceId = deviceInfo.DeviceID;
161
164
  const deviceName = deviceInfo.DeviceName;
162
165
 
163
- const displayMode = pluginConfig[0].accounts[this.deviceIndex].devices[index].displayMode ?? 0;
164
- const device = { name: deviceName, id: deviceId, type: deviceType, displayMode: displayMode };
165
- const push = deviceType === 0 ? pluginConfig[0].accounts[this.deviceIndex].devicesAta.push(device) : false;
166
- const push1 = deviceType === 1 ? pluginConfig[0].accounts[this.deviceIndex].devicesAtw.push(device) : false;
167
- const push2 = deviceType === 3 ? pluginConfig[0].accounts[this.deviceIndex].devicesErv.push(device) : false;
166
+ const device = { name: deviceName, id: deviceId, type: deviceType, displayMode: 0 };
167
+ const pushTypeAta = deviceType === 0 ? typeAta.push(device) : false;
168
+ const pushTypeAtw = deviceType === 1 ? typeAtw.push(device) : false;
169
+ const pushTypeErv = deviceType === 3 ? typeErv.push(device) : false;
168
170
  });
169
171
 
172
+ pluginConfig[0].accounts[this.deviceIndex].devicesAta = typeAta;
173
+ pluginConfig[0].accounts[this.deviceIndex].devicesAtw = typeAtw;
174
+ pluginConfig[0].accounts[this.deviceIndex].devicesErv = typeErv;
175
+
170
176
  await homebridge.updatePluginConfig(pluginConfig);
171
177
  await homebridge.savePluginConfig(pluginConfig);
172
178
  break;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "2.5.0-beta.35",
4
+ "version": "2.5.0-beta.37",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",