mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Merge pull request #126 from andythigpen/script-utc
Fix UTC issue with script component.
This commit is contained in:
commit
3f8fd8aa09
@ -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