Class ScriptExecution

java.lang.Object
org.openhab.core.model.script.actions.ScriptExecution

@NonNullByDefault public class ScriptExecution extends Object
The ScriptExecution is a wrapper for the ScriptExecution actions
Author:
Jan N. Klug - Initial contribution
  • Constructor Details

    • ScriptExecution

      public ScriptExecution()
  • Method Details

    • callScript

      public static Object callScript(String scriptName) throws ScriptExecutionException
      Calls a script which must be located in the configurations/scripts folder.
      Parameters:
      scriptName - the name of the script (if the name does not end with the .script file extension it is added)
      Returns:
      the return value of the script
      Throws:
      ScriptExecutionException - if an error occurs during the execution
    • createTimer

      public static Timer createTimer(ZonedDateTime zonedDateTime, org.eclipse.xtext.xbase.lib.Procedures.Procedure0 closure)
    • createTimer

      public static Timer createTimer(@Nullable String identifier, ZonedDateTime zonedDateTime, org.eclipse.xtext.xbase.lib.Procedures.Procedure0 closure)
    • createTimerWithArgument

      public static Timer createTimerWithArgument(ZonedDateTime zonedDateTime, Object arg1, org.eclipse.xtext.xbase.lib.Procedures.Procedure1 closure)
    • createTimerWithArgument

      public static Timer createTimerWithArgument(@Nullable String identifier, ZonedDateTime zonedDateTime, Object arg1, org.eclipse.xtext.xbase.lib.Procedures.Procedure1 closure)