djtimca / hagooglewifi

Home Assistant integration for Google Wifi systems.
Apache License 2.0
81 stars 27 forks source link

Unexpected error fetching GoogleWifi data: 'traffic' #43

Closed gmlupatelli closed 3 years ago

gmlupatelli commented 3 years ago

System: HassIO is running on a Raspberry PI 4 with 4Gb of RAM

Core Version core-2021.8.8 Newest Version core-2021.8.8

Supervisor Version supervisor-2021.08.1 Newest Version supervisor-2021.08.1

Host Operating System Home Assistant OS 6.2 Deployment production

Log info:

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: September 1, 2021, 2:24:44 PM (974 occurrences)
Last logged: 11:34:15 AM

Unexpected error fetching GoogleWifi data: 'traffic'
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 291, in structure_systems
    devices[this_station["station"]["id"]]["traffic"] = this_station["traffic"]
KeyError: 'traffic'

When this happen I couldn't pinpoint what triggers this error. It starts just after restarting the HA and keeps repeating.

gmlupatelli commented 3 years ago

Already covered by issue #40

djtimca commented 3 years ago

I believe this is now fixed in the latest.