djtimca / hagooglewifi

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

Entities go offline (unknown state) often #3

Closed ee02217 closed 4 years ago

ee02217 commented 4 years ago

Version: 0.0.8 Entities often go to unknown state and recover automatically. image

Error trace:

`` Logger: custom_components.googlewifi Source: custom_components/googlewifi/init.py:126 Integration: Google WiFi (documentation) First occurred: 4 November 2020, 22:17:44 (27 occurrences) Last logged: 9:01:27

Unexpected error fetching GoogleWifi data: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 217, in structure_systems for this_device in devices_list["stations"]: KeyError: 'stations'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/custom_components/googlewifi/init.py", line 121, in _async_update_data system_data = await self.api.get_systems() File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 142, in get_systems return await self.structure_systems(response) File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 229, in structure_systems raise GoogleWifiException(error) googlewifi.GoogleWifiException: 'stations'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh self.data = await self._async_update_data() File "/config/custom_components/googlewifi/init.py", line 126, in _async_update_data raise PlatformNotReady from error homeassistant.exceptions.PlatformNotReady ``

djtimca commented 4 years ago

Should be fixed in latest release. Please reopen if it is still occurring - will monitor on my system as well.

djtimca commented 4 years ago

The fix in 0.0.9 did not work, but version 0.1.0 seems to have solved this problem for good.