mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Fix utc issue with script component.
This commit is contained in:
parent
fdb46d80ba
commit
ef138bb132
@ -6,7 +6,8 @@ Scripts are a sequence of actions that can be triggered manually
|
||||
by the user or automatically based upon automation events, etc.
|
||||
"""
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import timedelta
|
||||
import homeassistant.util.dt as date_util
|
||||
import threading
|
||||
|
||||
from homeassistant.util import split_entity_id
|
||||
@ -109,7 +110,7 @@ class Script(object):
|
||||
self._call_service(action)
|
||||
elif CONF_DELAY in action:
|
||||
delay = timedelta(**action[CONF_DELAY])
|
||||
point_in_time = datetime.now() + delay
|
||||
point_in_time = date_util.now() + delay
|
||||
self.listener = self.hass.track_point_in_time(
|
||||
self, point_in_time)
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user