Skip to content

Commit 3d963b8

Browse files
committed
CRAI suggestions and bump version
1 parent bb6c78f commit 3d963b8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

custom_components/stromer/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"iot_class": "cloud_polling",
99
"issue_tracker": "https://github.com/CoMPaTech/stromer/issues",
1010
"requirements": [],
11-
"version": "0.4.2a1"
11+
"version": "0.4.2"
1212
}

custom_components/stromer/stromer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ async def stromer_update(self) -> None:
111111
LOGGER.error("Stromer error: api call failed 10 times, cowardly failing")
112112
raise ApiError
113113

114-
async def stromer_api_debouncer(self, url, timeout: int = 10, retries: int = 10, delay: int = 10):
115-
"""Debounce API-request to leverage DNS issues.."""
114+
async def stromer_api_debouncer(self, url: str, timeout: int = 10, retries: int = 10, delay: int = 10) -> aiohttp.ClientResponse:
115+
"""Debounce API-request to leverage DNS issues."""
116116
for attempt in range(retries):
117117
try:
118118
log = f"Attempt {attempt + 1}/{retries} to interface with Stromer on {url}"
119119
LOGGER.debug(log)
120-
res = await self._websession.get(url, timeout)
120+
res = await self._websession.get(url, timeout=timeout)
121121
res.raise_for_status()
122122
return res
123123
except (aiodns.error.DNSError, aiohttp.ClientError, TimeoutError) as e:

0 commit comments

Comments
 (0)