From c77c76e2fe632f5f76bbf6ddfc96851989de02a7 Mon Sep 17 00:00:00 2001 From: Francois JUMELLE Date: Sun, 2 Nov 2025 15:26:46 +0100 Subject: [PATCH] Better retry message --- plugin.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugin.py b/plugin.py index 932b008..0e05304 100755 --- a/plugin.py +++ b/plugin.py @@ -299,12 +299,11 @@ class BasePlugin: #Decrease retry self.retry = self.retry - 1 - Domoticz.Error(f"Cannot open connection to Heatzy API to get the mode for {alias} (retry={self.retry}): {exc}") - #Domoticz.Error("URL: " + str(url)) - #Domoticz.Error("Headers: " + str(headers)) - if 'response' in locals() and response != "": - Domoticz.Error("Response: " + str(response)) - + message = f"Cannot open connection to Heatzy API to get the mode for {alias} (retry={self.retry}): {exc}" + if self.retry < 0: + Domoticz.Error(message) + else: + Domoticz.Status(message + f" (retry left: {self.retry})") continue Domoticz.Debug(f"Get Mode Response for {alias}: {response}")