From b85f3081ab7838933fe38c5768a871cd6cb5b32c Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Tue, 29 Mar 2022 15:39:04 -0400 Subject: [PATCH] power: add retries to custom http requests Signed-off-by: Eric Callahan --- moonraker/components/power.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moonraker/components/power.py b/moonraker/components/power.py index eb9e21c..af0e0b4 100644 --- a/moonraker/components/power.py +++ b/moonraker/components/power.py @@ -977,7 +977,7 @@ class SmartThings(HTTPDevice): url = self.client.escape_url(url) response = await self.client.request( method, url, body=body, headers=headers, - enable_cache=False + attempts=3, enable_cache=False ) msg = f"Error sending SmartThings command: {command}" response.raise_for_status(msg) @@ -1052,7 +1052,7 @@ class HomeAssistant(HTTPDevice): url = self.client.escape_url(url) response = await self.client.request( method, url, body=body, headers=headers, - enable_cache=False + attempts=3, enable_cache=False ) msg = f"Error sending homeassistant command: {command}" response.raise_for_status(msg)