Skip to content

Commit

Permalink
don't pass in loop to async_timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Feb 7, 2022
1 parent 7c2904b commit 0a1bf01
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions custom_components/rs_wfirex4/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@ def try_again(err: str):
async_call_later(self.hass, secs, self.fetching_data)

try:
#with async_timeout.timeout(15, loop=self.hass.loop):
# asyncio.create_task(self.get_sensor_data())
#await self.get_sensor_data()
#self.hass.async_create_task(self.get_sensor_data())
with async_timeout.timeout(15, loop=self.hass.loop):
with async_timeout.timeout(15):
await self.get_sensor_data()

except (asyncio.TimeoutError, Exception) as err:
Expand Down

0 comments on commit 0a1bf01

Please sign in to comment.