djtimca / hagooglewifi

Home Assistant integration for Google Wifi systems.
Apache License 2.0
79 stars 26 forks source link

TypeError: 'NoneType' is not iterable #41

Closed boctok closed 3 years ago

boctok commented 3 years ago

In addition to the error traffic error reported in another issue, I've been getting this one:

`This error originated from a custom integration.

Logger: custom_components.googlewifi Source: custom_components/googlewifi/init.py:171 Integration: Google WiFi Integration (documentation, issues) First occurred: 6:36:10 PM (2 occurrences) Last logged: 6:54:29 PM

Unexpected error fetching GoogleWifi data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/googlewifi/init.py", line 171, in _async_update_data system_data = await self.api.get_systems() File "/usr/local/lib/python3.9/site-packages/googlewifi/init.py", line 191, in get_systems return await self.structure_systems(response) File "/usr/local/lib/python3.9/site-packages/googlewifi/init.py", line 289, in structure_systems for this_station in system_metrics.get("stationMetrics"): TypeError: 'NoneType' object is not iterable `

djtimca commented 3 years ago

I can't replicate this - it may be specific to your system or might be a periodic issue that the API for the metrics fails during the call.