Skip to content

Standard Actions ​

This page describes the standard actions for rules.

openHAB comes with a set of standard actions. These are built-in mechanisms that perform actions on behalf of rules.

Actions Structure ​

The standard actions are fundamentally Java classes that implement the required logic. We identify these actions using a code called the action type. These codes are used as titles for the sections below. To tell the action implementation what to do, actions can have configuration parameters with predefined names. These configuration parameters and a brief description of what values they expect are listed in the following sections.

core.RuleEnablementAction ​

This action enables or disables one or more specified Rules.

ParameterDescription
ruleUIDsThe List of rule UIDs of the Rules to enable or disable.
enableThe boolean value that decides if the rule(s) should be enabled or disabled.

core.RunRuleAction ​

This action runs one or more specified Rules.

ParameterDescription
ruleUIDsThe List of rule UIDs of the Rules to run.
[considerConditions]A boolean value that determines if Conditions should be considered. Defaults to false.

core.ItemCommandAction ​

This action sends a Command to an Item.

ParameterDescription
itemNameThe name of the Item.
commandThe Command to send.

core.ItemStateUpdateAction ​

This action updates the State of an Item.

ParameterDescription
itemNameThe name of the Item.
stateThe State to set.

media.PlayAction ​

This action plays an audio file.

ParameterDescription
soundThe filename of the file from the sounds folder.
[sink]The ID of the audio sink to use. Leave out to use the default.
[volume]The volume to be used. Leave out to use the default.

media.SayAction ​

This action uses the voice system to say the specified text.

ParameterDescription
textThe text to say.
[sink]The ID of the audio sink to use. Leave out to use the default.
[volume]The volume to be used. Leave out to use the default.

script.ScriptAction ​

This action executes the provided script.

ParameterDescription
typeThe code/MIME-type for the scripting language.
scriptThe script content to execute.