Skip to content

Commit

Permalink
Fix no end time in the last charge slot
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-r committed Jan 5, 2024
1 parent cf21820 commit 713d7ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/ohme/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def charge_graph_next_slot(charge_start, points, skip_format=False):
# Filter to points from now onwards
data = [x for x in data if x["t"] > now]

# Give up if we have less than 3 points
if len(data) < 3:
# Give up if we have less than 2 points
if len(data) < 2:
return {"start": None, "end": None}

start_ts = None
Expand Down

0 comments on commit 713d7ec

Please sign in to comment.