Skip to content

Commit

Permalink
Fix target time setting
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-r committed Feb 15, 2024
1 parent 7980117 commit fee9650
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/ohme/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def charge_graph_in_slot(charge_start, points, skip_format=False):

def time_next_occurs(hour, minute):
"""Find when this time next occurs."""
current = datetime.now()
target = current.replace(hour=hour, minute=minute, second=0, microsecond=0)
if target <= datetime.now():
target = target + timedelta(days=1)
Expand Down

0 comments on commit fee9650

Please sign in to comment.