Rule

data class Rule(val id: Int, val channels: Set<Channel>, val condition: Condition, val action: Action)

Represents rule used to define edge logic on the device.

Rules are defined by conditions and actions. If Condition is true, trigger Action.

It is possible to configure up to 12 rules and assign them to different channels. One rule can be assigned to any number of channels. For instance rule "If temperature is over 10 C, trigger the transmission" can be assigned to channels 1 and 2. No matter to how many channels a rule is assigned to, it's still counted as one rule.

Constructors

Link copied to clipboard
constructor(id: Int, channels: Set<Channel>, condition: Condition, action: Action)

Properties

Link copied to clipboard

to be triggered when specified Condition is met.

Link copied to clipboard

to which the rule is assigned. One rule can be assigned to multiple channels as long as those are of the same type. Maximum 6 channels are supported, numbered from 1 to 6.

Link copied to clipboard

to be checked by the device. If the condition is true, an Action is triggered.

Link copied to clipboard
val id: Int

of the rule. There are up to 12 rules that can be defined, having id in range from 1 to 12