Skip to content

Commit

Permalink
Revert "Ensure scheduler is active before kick in next_sunset/next_su…
Browse files Browse the repository at this point in the history
…nrise"

This reverts commit c68e60b.
  • Loading branch information
acockburn committed Mar 5, 2023
1 parent e18da8d commit 47ff3e4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions appdaemon/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ def todays_sunrise(self, days_offset):

async def next_sunrise(self, offset: int = 0):
# Kick the scheduler to force an update of self.now
if self.active is True:
await self.kick()
await self.kick()

day_offset = 0
while True:
Expand All @@ -416,8 +415,7 @@ async def next_sunrise(self, offset: int = 0):

async def next_sunset(self, offset: int = 0):
# Kick the scheduler to force an update of self.now
if self.active is True:
await self.kick()
await self.kick()

day_offset = 0
while True:
Expand Down

0 comments on commit 47ff3e4

Please sign in to comment.