Action

class Action : Node


Represents a command that the automation can issue, such as turning on a device, or a change to the value of a trait attribute, such as increasing a temperature threshold.

Summary

Public constructors

Action(
    entity: HasId,
    deviceType: DeviceTypeFactory<DeviceType>?,
    behavior: ActionBehavior
)

Create an Action instance from an entity and a DeviceType.

Public properties

ActionBehavior

The behavior of the Action.

DeviceTypeFactory<DeviceType>?

The DeviceType associated with the Action.

HasId

The unique ID for the entity associated with the Action.

Inherited properties

String?

String identifier of this node.

Public constructors

Action

Action(
    entity: HasId,
    deviceType: DeviceTypeFactory<DeviceType>? = null,
    behavior: ActionBehavior
)

Create an Action instance from an entity and a DeviceType. An entity may be a Device or a Structure.

Parameters
entity: HasId

The unique ID for the entity associated with the Action.

deviceType: DeviceTypeFactory<DeviceType>? = null

The DeviceType associated with the Action.

behavior: ActionBehavior

The behavior of the Action.

Public properties

behavior

val behaviorActionBehavior

The behavior of the Action.

deviceType

val deviceTypeDeviceTypeFactory<DeviceType>?

The DeviceType associated with the Action.

entity

val entityHasId

The unique ID for the entity associated with the Action.