From ab5fadfbf7f956b793d933bf0e79ada7692370d1 Mon Sep 17 00:00:00 2001 From: Kai Kreuzer Date: Tue, 31 Jan 2023 19:35:22 +0100 Subject: [PATCH] Fix account going offline every few seconds (#14300) Signed-off-by: Kai Kreuzer --- .../binding/tesla/internal/handler/TeslaAccountHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaAccountHandler.java b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaAccountHandler.java index d803d03a08615..9b01db6869eac 100644 --- a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaAccountHandler.java +++ b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaAccountHandler.java @@ -188,8 +188,8 @@ protected boolean checkResponse(Response response, boolean immediatelyFail) { } 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);