mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 18:27:51 +00:00
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:
parent
655ada1374
commit
cd89809be5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user