Classes
- OperationConfig
- CopyStateOperation
- SendCommandOrUpdateOperation
- ToggleOperation
- TimingItemStateOperation
Methods
build(nameopt, descriptionopt, tagsopt, idopt)
- Source:
Build this rule
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string |
<optional> |
of the rule |
description |
string |
<optional> |
of the rule |
tags |
Array.<String> |
<optional> |
of the rule |
id |
string |
<optional> |
of the rule |
inGroup(group) → {OperationBuilder}
- Source:
Specify the rule group for this rule
Parameters:
Name | Type | Description |
---|---|---|
group |
string | the group this rule belongs to. |
Returns:
this
- Type
- OperationBuilder
send(command) → {SendCommandOrUpdateOperation}
- Source:
Specifies that a command should be sent as a result of this rule firing.
Parameters:
Name | Type | Description |
---|---|---|
command |
string | the command to send |
Returns:
the operation
- Type
- SendCommandOrUpdateOperation
postUpdate(update) → {SendCommandOrUpdateOperation}
- Source:
Specifies that an update should be posted as a result of this rule firing.
Parameters:
Name | Type | Description |
---|---|---|
update |
string | the update to send |
Returns:
the operation
- Type
- SendCommandOrUpdateOperation
sendOn() → {SendCommandOrUpdateOperation}
- Source:
Specifies the command 'ON' should be sent as a result of this rule firing.
Returns:
the operation
- Type
- SendCommandOrUpdateOperation
sendOff() → {SendCommandOrUpdateOperation}
- Source:
Specifies the command 'OFF' should be sent as a result of this rule firing.
Returns:
the operation
- Type
- SendCommandOrUpdateOperation
sendToggle() → {ToggleOperation}
- Source:
Specifies a command should be sent to toggle the state of the target object as a result of this rule firing.
Returns:
the operation
- Type
- ToggleOperation
sendIt() → {SendCommandOrUpdateOperation}
- Source:
Specifies a command should be forwarded to the state of the target object as a result of this rule firing. This relies on the trigger being the result of a command itself.
Returns:
the operation
- Type
- SendCommandOrUpdateOperation
postIt() → {SendCommandOrUpdateOperation}
- Source:
Specifies a command state should be posted to the target object as a result of this rule firing. This relies on the trigger being the result of a command itself.
Returns:
the operation
- Type
- SendCommandOrUpdateOperation
copyState() → {CopyStateOperation}
- Source:
Copies the state from one item to another. Can be used to proxy item state. State is updated, not sent as a command.
Returns:
the operation config
- Type
- CopyStateOperation
copyAndSendState() → {CopyStateOperation}
- Source:
Sends the state from one item to another. Can be used to proxy item state. State is sent as a command.
Returns:
the operation config
- Type
- CopyStateOperation