Skip to content

Commit

Permalink
Lowered default API attempts to reduce startup delay, bump to v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
swartjean committed May 17, 2021
1 parent 92e8d33 commit 82b68e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/eskom_loadshedding/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NAME = "Eskom Loadshedding Interface"
DOMAIN = "eskom_loadshedding"
DOMAIN_DATA = f"{DOMAIN}_data"
VERSION = "1.0.4"
VERSION = "1.0.5"

ISSUE_URL = "https://github.com/swartjean/ha-eskom-loadshedding/issues"

Expand Down
4 changes: 2 additions & 2 deletions custom_components/eskom_loadshedding/eskom_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ async def async_query_api(self, endpoint, payload=None):
) as res:
return await res.json()

async def async_get_stage(self, attempts=30):
async def async_get_stage(self, attempts=5):
"""Fetches the current loadshedding stage from the Eskom API
Args:
attempts (int, optional): The number of attempts to query a sane value from the Eskom API. Defaults to 30.
attempts (int, optional): The number of attempts to query a sane value from the Eskom API. Defaults to 5.
Returns:
The loadshedding stage if the query succeeded, else `None`
Expand Down
2 changes: 1 addition & 1 deletion custom_components/eskom_loadshedding/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"issue_tracker": "https://github.com/swartjean/ha-eskom-loadshedding/issues",
"dependencies": [],
"config_flow": true,
"version": "1.0.4",
"version": "1.0.5",
"codeowners": [
"@swartjean"
],
Expand Down

0 comments on commit 82b68e8

Please sign in to comment.