mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Fix account going offline every few seconds (#14300)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
parent
9bafedc17b
commit
bfb6091d7b
@ -193,8 +193,8 @@ public class TeslaAccountHandler extends BaseBridgeHandler {
|
|||||||
} else {
|
} else {
|
||||||
logger.warn("Reached the maximum number of errors ({}) for the current interval ({} seconds)",
|
logger.warn("Reached the maximum number of errors ({}) for the current interval ({} seconds)",
|
||||||
API_MAXIMUM_ERRORS_IN_INTERVAL, API_ERROR_INTERVAL_SECONDS);
|
API_MAXIMUM_ERRORS_IN_INTERVAL, API_ERROR_INTERVAL_SECONDS);
|
||||||
|
apiIntervalErrors = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR);
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR);
|
||||||
} else if ((System.currentTimeMillis() - apiIntervalTimestamp) > 1000 * API_ERROR_INTERVAL_SECONDS) {
|
} else if ((System.currentTimeMillis() - apiIntervalTimestamp) > 1000 * API_ERROR_INTERVAL_SECONDS) {
|
||||||
logger.trace("Resetting the error counter. ({} errors in the last interval)", apiIntervalErrors);
|
logger.trace("Resetting the error counter. ({} errors in the last interval)", apiIntervalErrors);
|
||||||
|
Loading…
Reference in New Issue
Block a user