]> git.basschouten.com Git - openhab-addons.git/commitdiff
Fix account going offline every few seconds (#14300)
authorKai Kreuzer <kai@openhab.org>
Tue, 31 Jan 2023 18:35:22 +0000 (19:35 +0100)
committerGitHub <noreply@github.com>
Tue, 31 Jan 2023 18:35:22 +0000 (19:35 +0100)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaAccountHandler.java

index 7088d2ca26cf7b1c90a93607e47515cbe99cd45e..d585231d607de77381d29740382da91f1609636b 100644 (file)
@@ -193,8 +193,8 @@ public class TeslaAccountHandler extends BaseBridgeHandler {
                 } else {
                     logger.warn("Reached the maximum number of errors ({}) for the current interval ({} seconds)",
                             API_MAXIMUM_ERRORS_IN_INTERVAL, API_ERROR_INTERVAL_SECONDS);
+                    apiIntervalErrors = 0;
                 }
-
                 updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR);
             } else if ((System.currentTimeMillis() - apiIntervalTimestamp) > 1000 * API_ERROR_INTERVAL_SECONDS) {
                 logger.trace("Resetting the error counter. ({} errors in the last interval)", apiIntervalErrors);