Пример #1
0
 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
 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
 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)