コード例 #1
0
ファイル: __init__.py プロジェクト: cyrus19901/home-assistant
 def action(entity_id, variables):
     """Action to be executed."""
     _LOGGER.info('Executing %s', name)
     logbook.async_log_entry(hass, name, 'has been triggered', DOMAIN,
                             entity_id)
     yield from script_obj.async_run(variables)
コード例 #2
0
ファイル: __init__.py プロジェクト: DavidLP/home-assistant
 def action(entity_id, variables):
     """Action to be executed."""
     _LOGGER.info('Executing %s', name)
     logbook.async_log_entry(
         hass, name, 'has been triggered', DOMAIN, entity_id)
     yield from script_obj.async_run(variables)
 async def action(entity_id, variables, context):
     """Execute an action."""
     _LOGGER.info('Executing %s', name)
     logbook.async_log_entry(hass, name, 'has been triggered', DOMAIN,
                             entity_id)
     await script_obj.async_run(variables, context)
コード例 #4
0
ファイル: __init__.py プロジェクト: molobrakos/home-assistant
 def action(variables=None):
     """Action to be executed."""
     _LOGGER.info('Executing %s', name)
     logbook.async_log_entry(hass, name, 'has been triggered', DOMAIN)
     hass.loop.create_task(script_obj.async_run(variables))
コード例 #5
0
 async def action(entity_id, variables, context):
     """Execute an action."""
     _LOGGER.info('Executing %s', name)
     logbook.async_log_entry(
         hass, name, 'has been triggered', DOMAIN, entity_id)
     await script_obj.async_run(variables, context)