lichtteil / local_luftdaten

Custom component for Home Assistant that integrates your (own) local Luftdaten sensor (air quality/particle sensor) without using the cloud.
MIT License
46 stars 19 forks source link

TypeError: timeout() got an unexpected keyword argument 'loop' #47

Closed fraserp closed 2 years ago

fraserp commented 2 years ago

Since updating to 2.0.0 I am not getting data and am seeing the following errors in the log:

2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop' 2022-03-22 10:13:52 ERROR (MainThread) [homeassistant.components.sensor] local_luftdaten: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 737, in async_device_update await task File "/config/custom_components/local_luftdaten/sensor.py", line 116, in async_update await self.rest_client.async_update() File "/config/custom_components/local_luftdaten/sensor.py", line 163, in async_update with async_timeout.timeout(30, loop=self._loop): TypeError: timeout() got an unexpected keyword argument 'loop'

skibbipl commented 2 years ago

Same here: Home Assistant 2022.3.3

lichtteil commented 2 years ago

Hi @fraserp and @skibbipl,

can you please check which version you have installed? It should be version 2.1.0 (or dev). If not try to update and see if the error still exists.

Cheers!

skibbipl commented 2 years ago

I downloaded this and it works. However in manifest.json the version is 2.0.0.

fraserp commented 2 years ago

This all started ~2 weeks ago after I installed an update... at the time I thought it was 2.1.0... but it was reporting as 2.0.0, so didn't think anything of it... this morning its telling me 2.1.0 is available so I updated again and now its all working 🤷‍♂️