We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e848fc6 commit 1960b70Copy full SHA for 1960b70
appdaemon/scheduler.py
@@ -505,13 +505,7 @@ async def get_next_period(
505
interval: int | float | timedelta,
506
start: time | datetime | str | None = None,
507
) -> datetime:
508
- match interval:
509
- case int() | float():
510
- interval = timedelta(seconds=interval)
511
- case timedelta():
512
- ...
513
- case _:
514
- raise ValueError(f'Bad value for interval: {interval}')
+ interval = utils.parse_timedelta(interval)
515
516
now = (await self.get_now()).astimezone(self.AD.tz)
517
0 commit comments