Skip to content

Commit

Permalink
Removed blocking sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGos committed Oct 7, 2023
1 parent ba6dde6 commit 743d469
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions custom_components/davis_vantage/client.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from typing import Any
from datetime import datetime
import logging
from time import sleep
from pyvantagepro import VantagePro2
from pyvantagepro.parser import LoopDataParserRevB
import asyncio

from homeassistant.core import HomeAssistant

Expand Down Expand Up @@ -62,7 +60,6 @@ async def async_get_davis_time(self) -> datetime | None:
return data
except Exception as e:
last_error = e
asyncio.sleep(1)
tries -=1
_LOGGER.error(f"Couldn't acquire data from {self.get_link()}: {last_error}")
return None
Expand All @@ -77,7 +74,6 @@ async def async_set_davis_time(self) -> None:
return
except Exception as e:
last_error = e
asyncio.sleep(1)
tries -= 1
_LOGGER.error(f"Couldn't acquire data from {self.get_link()}: {last_error}")

Expand Down

0 comments on commit 743d469

Please sign in to comment.