From fee96500c5b99bebf5c688ca06e7c365046f7589 Mon Sep 17 00:00:00 2001 From: Daniel Raper Date: Thu, 15 Feb 2024 19:45:19 +0000 Subject: [PATCH] Fix target time setting --- custom_components/ohme/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/ohme/utils.py b/custom_components/ohme/utils.py index 1648727..dc1776d 100644 --- a/custom_components/ohme/utils.py +++ b/custom_components/ohme/utils.py @@ -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)