Hi, short question to see if I’m missing something or if this is considered a bug in AppDaemon:
I have the following App:
import datetime
import pytz
from appdaemon.plugins.hass.hassapi import Hass
class TestApp(Hass):
def initialize(self):
t = self.parse_time('13:22:00', aware=False)
self.run_daily(self.callback, t, type='daily')
self.run_minutely(self.callback, t, type='minutely')
def callback(self, kwargs):
tz = pytz.timezone('Europe/Berlin')
self.log(f'{kwargs["type"]} {datetime.datetime.now(tz)}')
When I run this app, this results in the log:
2020-10-25 13:20:44.535956 DEBUG test_app: Registering run_every starting 2020-10-25 13:22:00+01:00 in 86400s intervals for test_app
2020-10-25 13:20:44.541188 DEBUG test_app: Registering run_every starting 2020-10-25 12:21:00.539443+00:00 in 60s intervals for test_app
2020-10-25 13:21:01.017602 INFO test_app: minutely 2020-10-25 13:21:01.014841+01:00
2020-10-25 13:22:00.019459 INFO test_app: daily 2020-10-25 13:22:00.017322+01:00
2020-10-25 13:22:01.020923 INFO test_app: minutely 2020-10-25 13:22:01.018470+01:00
2020-10-25 13:23:01.027781 INFO test_app: minutely 2020-10-25 13:23:01.025124+01:00
Notice the different starting hours when registering the two intervals daily/minutely, and ‘minutely’ running at 13:21, although I specified 13:22 as start time. The same effect occurs with aware=True in self.parse_time.
Is this behavior intended?
Thanks!