Fix calc next (#21630)

This commit is contained in:
Paulus Schoutsen 2019-03-03 20:36:13 -08:00 committed by Paulus Schoutsen
parent 932080656d
commit cca8d4c951

View File

@ -370,9 +370,7 @@ def async_track_utc_time_change(hass, action,
last_now = now last_now = now
if next_time <= now: if next_time <= now:
if local: hass.async_run_job(action, dt_util.as_local(now) if local else now)
now = dt_util.as_local(now)
hass.async_run_job(action, now)
calculate_next(now + timedelta(seconds=1)) calculate_next(now + timedelta(seconds=1))
# We can't use async_track_point_in_utc_time here because it would # We can't use async_track_point_in_utc_time here because it would