OperationBuilder

OperationBuilder

Operation to execute as part of a rule

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) → {OperationBuilder.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
OperationBuilder.SendCommandOrUpdateOperation

postUpdate(update) → {OperationBuilder.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
OperationBuilder.SendCommandOrUpdateOperation

sendOn() → {OperationBuilder.SendCommandOrUpdateOperation}

Source:

Specifies the a command 'ON' should be sent as a result of this rule firing.

Returns:

the operation

Type
OperationBuilder.SendCommandOrUpdateOperation

sendOff() → {OperationBuilder.SendCommandOrUpdateOperation}

Source:

Specifies the a command 'OFF' should be sent as a result of this rule firing.

Returns:

the operation

Type
OperationBuilder.SendCommandOrUpdateOperation

sendToggle() → {OperationBuilder.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
OperationBuilder.ToggleOperation

sendIt() → {OperationBuilder.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
OperationBuilder.SendCommandOrUpdateOperation

postIt() → {OperationBuilder.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
OperationBuilder.SendCommandOrUpdateOperation

copyState() → {OperationBuilder.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
OperationBuilder.CopyStateOperation

copyAndSendState() → {OperationBuilder.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
OperationBuilder.CopyStateOperation