homebridge-enphase-envoy 9.13.2-beta.21 → 9.13.2-beta.22
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 +3 -3
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.22",
|
|
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,7 +1801,7 @@ 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
|
|
@@ -1810,8 +1810,8 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1810
1810
|
|
|
1811
1811
|
//pcu power
|
|
1812
1812
|
this.pv.inventory.pcu.forEach((pcu, index) => {
|
|
1813
|
-
const index1 =
|
|
1814
|
-
const pcuProduction =
|
|
1813
|
+
const index1 = pcus.findIndex(device => device.serialNumber == pcu.serialNumber);
|
|
1814
|
+
const pcuProduction = pcus[index1];
|
|
1815
1815
|
const obj = {
|
|
1816
1816
|
type: pcuProduction.devType ?? 'Microinverter',
|
|
1817
1817
|
lastReportDate: new Date(pcuProduction.lastReportDate * 1000).toLocaleString(),
|