homebridge-enphase-envoy 10.2.6-beta.7 → 10.2.6-beta.8

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/package.json +1 -1
  2. package/src/envoydata.js +4 -4
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": "10.2.6-beta.7",
5
+ "version": "10.2.6-beta.8",
6
6
  "description": "Homebridge p7ugin for Photovoltaic Energy System manufactured by Enphase.",
7
7
  "license": "MIT",
8
8
  "author": "grzegorz914",
package/src/envoydata.js CHANGED
@@ -2040,11 +2040,11 @@ class EnvoyData extends EventEmitter {
2040
2040
 
2041
2041
  try {
2042
2042
  const response = await this.axiosInstance.get(ApiUrls.EnsemblePower);
2043
- const devices = response.data.devices || [];
2044
- if (this.logDebug) this.emit('debug', `Ensemble power response:`, devices);
2043
+ const responseData = response.data;
2044
+ if (this.logDebug) this.emit('debug', `Ensemble power response:`, responseData);
2045
2045
 
2046
- const devicesSupported = devices.length > 0;
2047
- if (!devicesSupported) return false;
2046
+ const devices = responseData.devices ?? [];
2047
+ if (!devices.length === 0) return false;
2048
2048
 
2049
2049
  // update encharges
2050
2050
  const enchargesRealPowerSummary = [];