Skip to content

Commit

Permalink
Merge pull request #196 from basbruss/end-time
Browse files Browse the repository at this point in the history
Fix endtime when `00:00:00`
  • Loading branch information
basbruss authored Jun 4, 2024
2 parents 6450e3e + 3de0bac commit d736635
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/adaptive_cover/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,10 @@ def before_end_time(self):
)
return now < time
if self.end_time is not None:
time = get_datetime_from_str(self.end_time).time()
now = dt.datetime.now().time()
time = get_datetime_from_str(self.end_time)
if time.time() == dt.time(0, 0):
time = time + dt.timedelta(days=1)
now = dt.datetime.now()
_LOGGER.debug(
"End time: %s, now: %s, now < time: %s", time, now, now < time
)
Expand Down

0 comments on commit d736635

Please sign in to comment.