Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 071e972

Browse files
committed
Fix bug introduced in #49
1 parent f1ed257 commit 071e972

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/ohme/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def _charge_finished(data):
4747
now = int(time())
4848
data = [x['y'] for x in data if x["t"] > now]
4949

50-
if min(data) == max(data):
50+
if len(data) == 0 or min(data) == max(data):
5151
return True
5252
return False
5353

0 commit comments

Comments
 (0)