Fix bug get mode

This commit is contained in:
2025-10-26 20:56:39 +01:00
parent 7828542c6c
commit 1672ba6dc5

View File

@@ -302,7 +302,7 @@ class BasePlugin:
Domoticz.Error("Response: " + str(response)) Domoticz.Error("Response: " + str(response))
else: else:
Domoticz.Debug(f"Cannot open connection to Heatzy API to get the mode for {alias}: {exc}") Domoticz.Debug(f"Cannot open connection to Heatzy API to get the mode for {alias}: {exc}")
return continue
Domoticz.Debug(f"Get Mode Response for {alias}: {response}") Domoticz.Debug(f"Get Mode Response for {alias}: {response}")
@@ -314,7 +314,7 @@ class BasePlugin:
if obsolete_min >= 180 and Devices[deviceid].TimedOut == 0: if obsolete_min >= 180 and Devices[deviceid].TimedOut == 0:
Domoticz.Status(f"Last update from '{alias}' was {obsolete_min} min earlier.") Domoticz.Status(f"Last update from '{alias}' was {obsolete_min} min earlier.")
Devices[deviceid].TimedOut = 1 Devices[deviceid].TimedOut = 1
return continue
device["updated_at"] = response["updated_at"] device["updated_at"] = response["updated_at"]
if Devices[deviceid].TimedOut == 1: if Devices[deviceid].TimedOut == 1:
@@ -364,7 +364,7 @@ class BasePlugin:
#attr is empty... #attr is empty...
Domoticz.Status("We force a setMode to try to get the correct mode at the next try...") Domoticz.Status("We force a setMode to try to get the correct mode at the next try...")
self.set_mode(deviceid, HEATZY_MODE_VALUE['FROSTFREE']) self.set_mode(deviceid, HEATZY_MODE_VALUE['FROSTFREE'])
return continue
# If mode = OFF and bug, then mode = FROSTFREE # If mode = OFF and bug, then mode = FROSTFREE
if self.bug and mode == 'OFF': if self.bug and mode == 'OFF':