Fix trigger of error message
This commit is contained in:
@@ -296,7 +296,7 @@ class BasePlugin:
|
||||
response = requests.get(url, headers=headers, timeout=self._HTTP_TIMEOUT).json()
|
||||
except Exception as exc:
|
||||
message = f"Cannot open connection to Heatzy API to get the mode for {alias} (retry={self.retry}): {exc}"
|
||||
if self.retry < 0:
|
||||
if self.retry <= 0:
|
||||
Domoticz.Error(message)
|
||||
else:
|
||||
Domoticz.Status(message + f" (retry left: {self.retry})")
|
||||
|
||||
Reference in New Issue
Block a user