diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index e78d70fd11a..aa649c400a0 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -24,7 +24,6 @@ import homeassistant.config as config_util import homeassistant.loader as loader import homeassistant.components as core_components import homeassistant.components.group as group -from homeassistnat.helpers import event_decorators from homeassistant.helpers.entity import Entity from homeassistant.const import ( __version__, EVENT_COMPONENT_LOADED, CONF_LATITUDE, CONF_LONGITUDE, @@ -205,6 +204,7 @@ def from_config_dict(config, hass=None, config_dir=None, enable_log=True, _setup_component(hass, domain, config) # activate event decorators + from homeassistant.helpers import event_decorators event_decorators.activate(hass) return hass diff --git a/homeassistant/helpers/event.py b/homeassistant/helpers/event.py index e8c9d0048b0..42725b8eea9 100644 --- a/homeassistant/helpers/event.py +++ b/homeassistant/helpers/event.py @@ -7,7 +7,6 @@ import functools as ft from ..util import dt as dt_util from ..const import ( ATTR_NOW, EVENT_STATE_CHANGED, EVENT_TIME_CHANGED, MATCH_ALL) -from homeassistant.components import sun def track_state_change(hass, entity_ids, action, from_state=None, @@ -101,6 +100,7 @@ def track_sunrise(hass, action, offset=None): """ Adds a listener that will fire a specified offset from sunrise daily. """ + from homeassistant.components import sun offset = offset or timedelta() def next_rise(): @@ -124,6 +124,7 @@ def track_sunset(hass, action, offset=None): """ Adds a listener that will fire a specified offset from sunset daily. """ + from homeassistant.components import sun offset = offset or timedelta() def next_set():