Closed dhover closed 3 years ago
After a reboot the errors are gone!
I also see this exception, about 3-5 times per day:
Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh update_callback() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 500, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/weather/init.py", line 190, in state_attributes if self.temperature is not None: File "/config/custom_components/smartweather/weather.py", line 112, in temperature if self._current is not None: File "/config/custom_components/smartweather/entity.py", line 51, in _current return self.coordinator.data[0] IndexError: list index out of range
These errors typically occur, when we cannot reach the WeatherFlow Server. I need to do better error handling on this. It can be a local internet issue, or the WeatherFlow servers can be temporarily unavailable. As @dhover found, rebooting or going to the Integrations page in HA, and then click the 3 dots in the lower right corner of the integration, and select Reload most often resolves these issues.
Sounds about right, since the data object is empty, it'S either a local issue or a general issue connecting to the weather flow servers.
I guess you should implement at least some exception handling to cover sporadic failures so the error logs don't pile up.
Sounds about right, since the data object is empty, it'S either a local issue or a general issue connecting to the weather flow servers.
I guess you should implement at least some exception handling to cover sporadic failures so the error logs don't pile up.
I agree. Some extra exception handling should prevent those errors.
I will work on the error handling.
I got an error saying:
2021-09-27 19:51:21 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 708, in _update_entity_states await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 451, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 500, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 190, in state_attributes if self.temperature is not None: File "/config/custom_components/smartweather/weather.py", line 112, in temperature if self._current is not None: File "/config/custom_components/smartweather/entity.py", line 51, in _current return self.coordinator.data[0] IndexError: list index out of range
What is wrong?
I am using Start Weather v2.2.9 on HA 2021.9.7 / HassOS 6.4