homebridge-melcloud-control 3.8.0-beta.27 → 3.8.0-beta.28
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.
- package/package.json +1 -1
- package/src/deviceata.js +4 -6
- package/src/deviceatw.js +2 -3
- package/src/deviceerv.js +4 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.8.0-beta.
|
|
4
|
+
"version": "3.8.0-beta.28",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/deviceata.js
CHANGED
|
@@ -1204,8 +1204,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1204
1204
|
|
|
1205
1205
|
//update presets state
|
|
1206
1206
|
if (this.presetsConfigured.length > 0) {
|
|
1207
|
-
|
|
1208
|
-
const preset = this.presetsConfigured[i];
|
|
1207
|
+
this.presetsConfigured.forEach((preset, i) => {
|
|
1209
1208
|
const presetData = presetsOnServer.find(p => p.ID === preset.Id);
|
|
1210
1209
|
|
|
1211
1210
|
preset.state = presetData ? (presetData.Power === power
|
|
@@ -1220,13 +1219,12 @@ class DeviceAta extends EventEmitter {
|
|
|
1220
1219
|
this.presetsServices[i]
|
|
1221
1220
|
.updateCharacteristic(characteristicType, preset.state)
|
|
1222
1221
|
};
|
|
1223
|
-
};
|
|
1222
|
+
});
|
|
1224
1223
|
};
|
|
1225
1224
|
|
|
1226
1225
|
//update buttons state
|
|
1227
1226
|
if (this.buttonsConfiguredCount > 0) {
|
|
1228
|
-
|
|
1229
|
-
const button = this.buttonsConfigured[i];
|
|
1227
|
+
this.buttonsConfigured.forEach((button, i) => {
|
|
1230
1228
|
const mode = button.mode;
|
|
1231
1229
|
switch (mode) {
|
|
1232
1230
|
case 0: //POWER ON,OFF
|
|
@@ -1345,7 +1343,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1345
1343
|
this.buttonsServices[i]
|
|
1346
1344
|
.updateCharacteristic(characteristicType, button.state)
|
|
1347
1345
|
};
|
|
1348
|
-
};
|
|
1346
|
+
});
|
|
1349
1347
|
};
|
|
1350
1348
|
|
|
1351
1349
|
//log current state
|
package/src/deviceatw.js
CHANGED
|
@@ -1797,8 +1797,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1797
1797
|
|
|
1798
1798
|
//update presets state
|
|
1799
1799
|
if (this.presetsConfigured.length > 0) {
|
|
1800
|
-
|
|
1801
|
-
const preset = this.presetsConfigured[i];
|
|
1800
|
+
this.presetsConfigured.forEach((preset, i) => {
|
|
1802
1801
|
const presetData = presetsOnServer.find(p => p.ID === preset.Id);
|
|
1803
1802
|
|
|
1804
1803
|
preset.state = presetData ? (presetData.Power === power
|
|
@@ -1819,7 +1818,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1819
1818
|
this.presetsServices[i]
|
|
1820
1819
|
.updateCharacteristic(characteristicType, preset.state)
|
|
1821
1820
|
};
|
|
1822
|
-
};
|
|
1821
|
+
});
|
|
1823
1822
|
};
|
|
1824
1823
|
|
|
1825
1824
|
//update buttons state
|
package/src/deviceerv.js
CHANGED
|
@@ -1131,8 +1131,7 @@ class DeviceErv extends EventEmitter {
|
|
|
1131
1131
|
|
|
1132
1132
|
//update presets state
|
|
1133
1133
|
if (this.presetsConfigured.length > 0) {
|
|
1134
|
-
|
|
1135
|
-
const preset = this.presetsConfigured[i];
|
|
1134
|
+
this.presetsConfigured.forEach((preset, i) => {
|
|
1136
1135
|
const presetData = presetsOnServer.find(p => p.ID === preset.Id);
|
|
1137
1136
|
|
|
1138
1137
|
preset.state = presetData ? (presetData.Power === power
|
|
@@ -1146,13 +1145,12 @@ class DeviceErv extends EventEmitter {
|
|
|
1146
1145
|
this.presetsServices[i]
|
|
1147
1146
|
.updateCharacteristic(characteristicType, preset.state)
|
|
1148
1147
|
};
|
|
1149
|
-
};
|
|
1148
|
+
});
|
|
1150
1149
|
};
|
|
1151
1150
|
|
|
1152
1151
|
//update buttons state
|
|
1153
1152
|
if (this.buttonsConfiguredCount > 0) {
|
|
1154
|
-
|
|
1155
|
-
const button = this.buttonsConfigured[i];
|
|
1153
|
+
this.buttonsConfigured.forEach((button, i) => {
|
|
1156
1154
|
const mode = button.mode;;
|
|
1157
1155
|
switch (mode) {
|
|
1158
1156
|
case 0: //POWER ON,OFF
|
|
@@ -1208,7 +1206,7 @@ class DeviceErv extends EventEmitter {
|
|
|
1208
1206
|
this.buttonsServices[i]
|
|
1209
1207
|
.updateCharacteristic(characteristicType, button.state)
|
|
1210
1208
|
};
|
|
1211
|
-
};
|
|
1209
|
+
});
|
|
1212
1210
|
};
|
|
1213
1211
|
|
|
1214
1212
|
//log current state
|