Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Increase request timeout, decrease scan_interval
Browse files Browse the repository at this point in the history
  • Loading branch information
foosel committed Mar 15, 2020
1 parent 00e6ec1 commit a7f7964
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/coronavirus_hessen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def get_coordinator(hass):
return hass.data[DOMAIN]

async def async_get_data():
with async_timeout.timeout(10):
with async_timeout.timeout(30):
response = await aiohttp_client.async_get_clientsession(hass).get(ENDPOINT)
raw_html = await response.text()

Expand Down Expand Up @@ -99,7 +99,7 @@ async def async_get_data():
logging.getLogger(__name__),
name=DOMAIN,
update_method=async_get_data,
update_interval=timedelta(hours=12), # 12h as the data apparently only updates once per day anyhow
update_interval=timedelta(hours=6),
)
await hass.data[DOMAIN].async_refresh()
return hass.data[DOMAIN]

0 comments on commit a7f7964

Please sign in to comment.