Make automation async

This commit is contained in:
Paulus Schoutsen committed 2016-10-01 14:11:16 -07:00
1 parent 16ff68ca84
commit 7ab7edd81c
19 files changed
+205 -346

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@ TRIGGER_SCHEMA = vol.Schema({
})
def trigger(hass, config, action):
def async_trigger(hass, config, action):
"""Listen for events based on configuration."""
event_type = config.get(CONF_EVENT_TYPE)
event_data = config.get(CONF_EVENT_DATA)
@@ -41,4 +41,4 @@ def trigger(hass, config, action):
},
})
return hass.bus.listen(event_type, handle_event)
return hass.bus.async_listen(event_type, handle_event)