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

Weirt example in Choosing a Start Time #1883

Open
pando85 opened this issue Nov 25, 2023 · 0 comments
Open

Weirt example in Choosing a Start Time #1883

pando85 opened this issue Nov 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@pando85
Copy link
Contributor

pando85 commented Nov 25, 2023

What happened?

Documentation says:

Choosing a Start Time
~~~~~~~~~~~~~~~~~~~~~

Internally, AppDaemon keeps track of its own time relative to when it
was started. This make it possible to start AppDaemon with a different
start time and date to the current time. For instance, to test that
sunset App, start AppDaemon at a time just before sunset and see if it
works as expected. To do this, simply use the "-s" argument on
AppDaemon's command line. e.g.:

.. code:: bash

    $ apprun -s "2018-23-27 16:30:00"
    ...
    2018-12-27 09:31:20.794106 INFO     AppDaemon  App initialization complete
    2018-23-27 16:30:00.000000 INFO     AppDaemon  Starting time travel ...
    2018-23-27 16:30:00:50.000000 INFO     AppDaemon  Setting clocks to 2018-23-27 16:30:00
    2018-23-27 16:30:00.000000 INFO     AppDaemon  Time displacement factor 1.0
    ...

Note the timestamps in the log - AppDaemon believes it is now just
before sunset and will process any callbacks appropriately.

If you see that is not a valid datetime. I just wanted to point that it could be validated and also docu is weird with that value.

I don't use that functionality because it doesn't overwrite datetime.datetime.now() but I wanted to report it.

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

No response

Anything else?

No response

@pando85 pando85 added the bug Something isn't working label Nov 25, 2023
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