Skip to content

Commit

Permalink
Fix slow updates for calendar entity
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Dec 6, 2024
1 parent a1a4ab9 commit 99a2158
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/yandex_station/core/yandex_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def _request(self, method: str, url: str, **kwargs):
url = url.replace("yandex.ru", self.domain)
kwargs["proxy"] = self.proxy
kwargs["ssl"] = self.ssl
kwargs.setdefault("timeout", 5.0)
return getattr(self._session, method)(url, **kwargs)

def _get(self, url: str, **kwargs):
Expand Down Expand Up @@ -488,8 +489,6 @@ async def request(self, method: str, url: str, retry: int = 2, **kwargs):
elif r.status == 403:
# 403 - no x-csrf-token
self.csrf_token = None
elif r.status == 500:
await asyncio.sleep(1)
else:
_LOGGER.warning(f"{url} return {r.status} status")

Expand Down

0 comments on commit 99a2158

Please sign in to comment.