Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_at_sunset() with offset not handled correctly after a reload #2188

Open
ekutner opened this issue Dec 31, 2024 · 0 comments
Open

run_at_sunset() with offset not handled correctly after a reload #2188

ekutner opened this issue Dec 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ekutner
Copy link

ekutner commented Dec 31, 2024

What happened?

When a task is scheduled with run_at_sunset() with an offset and the code is reloaded or the server is restarted in the time frame between sunset and sunset+offset the task is scheduled to run the next day instead of the current day.

Example:
Assume sunset is at 17:00 and there is an offset of 3600s, which means the task should run at 18:00.
Restart the appdaemon server any time between 17:00 and 18:00
The task should still be scheduled for the same day at 18:00 because that time didn't occur ye,t however, it is scheduled for the next day.

Version

4.4.2

Installation type

Home Assistant add-on

Relevant log output

No response

Relevant code in the app or config file that caused the issue

self.run_at_sunset(self.do_ops, offset=3600)

Anything else?

No response

@ekutner ekutner added the bug Something isn't working label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant