Make time trigger data trigger.now local (#21544)

* Make time trigger data trigger.now local

* Make time pattern trigger data trigger.now local

* Lint

* Rework according to review comment

* Lint
This commit is contained in:
emontnemery 2019-03-02 08:09:12 +01:00 committed by Paulus Schoutsen
parent 655ada1374
commit cd89809be5

View File

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