diff --git a/homeassistant/components/script.py b/homeassistant/components/script.py index 8c521c33856..df46fb5a03d 100644 --- a/homeassistant/components/script.py +++ b/homeassistant/components/script.py @@ -7,6 +7,7 @@ by the user or automatically based upon automation events, etc. For more details about this component, please refer to the documentation at https://home-assistant.io/components/script/ """ +import asyncio import logging import voluptuous as vol @@ -72,11 +73,13 @@ def toggle(hass, entity_id): hass.services.call(DOMAIN, SERVICE_TOGGLE, {ATTR_ENTITY_ID: entity_id}) -def setup(hass, config): +@asyncio.coroutine +def async_setup(hass, config): """Load the scripts from the configuration.""" component = EntityComponent(_LOGGER, DOMAIN, hass, group_name=GROUP_NAME_ALL_SCRIPTS) + @asyncio.coroutine def service_handler(service): """Execute a service call to script.