mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Initial pass at event decorators
Created event decorators for custom components. Decorators were created for the events: track_state_change, track_sunrise, track_sunset, and track_time_change.
This commit is contained in:
@@ -24,6 +24,7 @@ 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,
|
||||
@@ -203,6 +204,9 @@ def from_config_dict(config, hass=None, config_dir=None, enable_log=True,
|
||||
for domain in loader.load_order_components(components):
|
||||
_setup_component(hass, domain, config)
|
||||
|
||||
# activate event decorators
|
||||
event_decorators.activate(hass)
|
||||
|
||||
return hass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user