power: sleep for 1 second between failed retries
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
04477705b0
commit
209bdc18da
|
@ -428,6 +428,7 @@ class HTTPDevice(PowerDevice):
|
||||||
if i == retries - 1:
|
if i == retries - 1:
|
||||||
msg = f"Error sending '{self.type}' command: {command}"
|
msg = f"Error sending '{self.type}' command: {command}"
|
||||||
raise self.server.error(msg) from e
|
raise self.server.error(msg) from e
|
||||||
|
await asyncio.sleep(1.0)
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in New Issue