Skip to content

Commit 2604888

Browse files
author
Ravi Nadahar
committed
standard-actions.md
1 parent 027bff4 commit 2604888

2 files changed

Lines changed: 85 additions & 2 deletions

File tree

concepts/standard-actions.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
layout: documentation
3+
title: Standard Actions
4+
---
5+
6+
# Standard Actions
7+
8+
This page describes the standard actions for [rules](./rules.md).
9+
10+
OpenHAB comes with a set of standard actions.
11+
These are built-in mechanisms that perform actions on behalf of rules.
12+
13+
## Actions Structure
14+
15+
The standard actions are fundamentally Java classes that implement the required logic.
16+
We identify these actions using a code called the action type.
17+
These codes are used as titles for the sections below.
18+
To tell the action implementation what to do, actions can have configuration parameters with predefined names.
19+
These configuration parameters and a brief description of what values they expect are listed in the following sections.
20+
21+
### `core.RuleEnablementAction`
22+
23+
This action enables or disables one or more specified `Rule`s.
24+
25+
| Parameter | Description |
26+
|------------|-----------------------------------------------------------------------------------------|
27+
| `ruleUIDs` | The `List` of rule UIDs of the `Rule`s to enable or disable. |
28+
| `enable` | The boolean value that decides if the rule(s) should be enabled or disabled. |
29+
30+
### `core.RunRuleAction`
31+
32+
This action runs one or more specified `Rule`s.
33+
34+
| Parameter | Description |
35+
|------------------------|--------------------------------------------------------------------------------------------|
36+
| `ruleUIDs` | The `List` of rule UIDs of the `Rule`s to run. |
37+
| `[considerConditions]` | A boolean value that determines if `Condition`s should be considered. Defaults to `false`. |
38+
39+
### `core.ItemCommandAction`
40+
41+
This action sends a `Command` to an `Item`.
42+
43+
| Parameter | Description |
44+
|------------|-----------------------------------------------------------------------------------------|
45+
| `itemName` | The name of the `Item`. |
46+
| `command` | The `Command` to send. |
47+
48+
### `core.ItemStateUpdateAction`
49+
50+
This action updates the `State` of an `Item`.
51+
52+
| Parameter | Description |
53+
|------------|-----------------------------------------------------------------------------------------|
54+
| `itemName` | The name of the `Item`. |
55+
| `state` | The `State` to set. |
56+
57+
### `media.PlayAction`
58+
59+
This action plays an audio file.
60+
61+
| Parameter | Description |
62+
|-------------|-----------------------------------------------------------------------------------------|
63+
| `sound` | The filename of the file from the `sounds` folder. |
64+
| `[sink]` | The ID of the audio sink to use. Leave out to use the default. |
65+
| `[volume]` | The volume to be used. Leave out to use the default. |
66+
67+
### `media.SayAction`
68+
69+
This action uses the voice system to say the specified text.
70+
71+
| Parameter | Description |
72+
|-------------|-----------------------------------------------------------------------------------------|
73+
| `text` | The text to say. |
74+
| `[sink]` | The ID of the voice to use. Leave out to use the default. |
75+
| `[volume]` | The volume to be used. Leave out to use the default. |
76+
77+
### `script.ScriptAction`
78+
79+
This action executes the provided script.
80+
81+
| Parameter | Description |
82+
|-----------|-------------------------------------------------------------------------|
83+
| `type` | The code/MIME-type for the scripting language. |
84+
| `script` | The script content to execute. |

concepts/standard-conditions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ title: Standard Conditions
88
This page describes the standard conditions for [rules](./rules.md).
99

1010
OpenHAB comes with a set of standard conditions.
11-
These are built-in mechanisms that initiate rule execution based on specific events or conditions.
12-
They provide a way to automate actions without the need for custom scripting, making them accessible and easy to use.
11+
These are built-in mechanisms that decide if a rule should be executed when triggered.
1312

1413
## Conditions Structure
1514

0 commit comments

Comments
 (0)