homebridge-enphase-envoy 9.13.2-beta.21 → 9.13.2-beta.23
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/envoydevice.js +4 -6
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"displayName": "Enphase Envoy",
|
|
4
4
|
"name": "homebridge-enphase-envoy",
|
|
5
|
-
"version": "9.13.2-beta.
|
|
5
|
+
"version": "9.13.2-beta.23",
|
|
6
6
|
"description": "Homebridge plugin for Photovoltaic Energy System manufactured by Enphase.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "grzegorz914",
|
package/src/envoydevice.js
CHANGED
|
@@ -1801,17 +1801,15 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
|
|
1803
1803
|
const response = this.pv.envoy.firmware7xx ? await this.axiosInstance(ApiUrls.InverterProduction) : await this.digestAuthEnvoy.request(ApiUrls.InverterProduction, options);
|
|
1804
|
-
const
|
|
1804
|
+
const pcus = response.data;
|
|
1805
1805
|
const debug = this.enableDebugMode ? this.emit('debug', `Pcu status:`, pcu) : false;
|
|
1806
1806
|
|
|
1807
1807
|
//pcu devices count
|
|
1808
|
-
const pcuStatusSupported =
|
|
1808
|
+
const pcuStatusSupported = pcus.length > 0;
|
|
1809
1809
|
if (pcuStatusSupported) {
|
|
1810
|
-
|
|
1811
|
-
//pcu power
|
|
1812
1810
|
this.pv.inventory.pcu.forEach((pcu, index) => {
|
|
1813
|
-
const index1 =
|
|
1814
|
-
const pcuProduction =
|
|
1811
|
+
const index1 = pcus.findIndex(device => device.serialNumber == pcu.serialNumber);
|
|
1812
|
+
const pcuProduction = pcus[index1];
|
|
1815
1813
|
const obj = {
|
|
1816
1814
|
type: pcuProduction.devType ?? 'Microinverter',
|
|
1817
1815
|
lastReportDate: new Date(pcuProduction.lastReportDate * 1000).toLocaleString(),
|