briancmpbll / home_assistant_custom_envoy

177 stars 77 forks source link

Retrying serup : 0 #52

Closed madmax1970 closed 1 year ago

madmax1970 commented 1 year ago

After upgrading from HACS I started to get this error. I was previously able to connect without problems. Logs shows the following:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 195, in _async_update_data return await self.update_method() File "/config/custom_components/enphase_envoy/init.py", line 62, in async_update_data battery_data = await envoy_reader.battery_storage() File "/config/custom_components/enphase_envoy/envoy_reader.py", line 730, in battery_storage if len(ensemble_json) > 0 and "devices" in ensemble_json[0].keys(): KeyError: 0

Any reason why I suddenly get this error? Cheers!

briancmpbll commented 1 year ago

Can you give me an example response from your /ivp/ensemble/inventory?

I'm not an expert python programmer, but that error doesn't make sense to me, since I'm checking the length of the array just before accessing it.

briancmpbll commented 1 year ago

Can't reproduce.