From 72ff63c05f4021a6b2271e23591a4973dfd997ea Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Thu, 1 Apr 2021 10:18:13 +0200 Subject: [PATCH] fix charge control --- ChargeControl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChargeControl.py b/ChargeControl.py index 31e6e39..c5f1c17 100644 --- a/ChargeControl.py +++ b/ChargeControl.py @@ -88,7 +88,7 @@ class ChargeControl: thread.setDaemon(True) thread.start() else: - if self._next_stop_hour < now: + if self._next_stop_hour is not None and self._next_stop_hour < now: self._next_stop_hour += timedelta(days=1) self.retry_count = 0 except AttributeError: