Add delay to retry
This commit is contained in:
parent
f6600c7dda
commit
52c0e90a52
@ -1,6 +1,6 @@
|
||||
name: "Fritz!Box Temperature Sync"
|
||||
description: "Sync Fritz!DECT thermostat temperatures with other sensors in Home Assistant"
|
||||
version: "0.3.0"
|
||||
version: "0.3.1"
|
||||
startup: "application"
|
||||
stage: "experimental"
|
||||
slug: "fritz_temp_sync"
|
||||
|
@ -37,6 +37,8 @@ class HomeAssistantAPI:
|
||||
except InvalidStatusCode:
|
||||
if retries > 0:
|
||||
retries -= 1
|
||||
await asyncio.sleep(10)
|
||||
logging.info("Retry home assistant connection...")
|
||||
continue
|
||||
else:
|
||||
logging.error("Invalid status code while connecting to Home Assistant")
|
||||
|
Loading…
x
Reference in New Issue
Block a user