Better retry message
This commit is contained in:
11
plugin.py
11
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}")
|
||||
|
||||
Reference in New Issue
Block a user