A set of actions to be applied as a single set.


class HMActionSet : NSObject


Action sets can be executed as a result of evaluating a trigger (instances of HMTrigger) or manually with executeActionSet(_:completionHandler:). Actions in an action set are performed in an unspecified order. You create new action sets using the addActionSet(withName:completionHandler:) method of HMHome.


Managing Action Sets

var name: String

The name of the action set.

var uniqueIdentifier: UUID

The action set's unique identifier.

var actions: Set<HMAction>

Set of actions in the action set.

var isExecuting: Bool

The execution status of the action set.

var lastExecutionDate: Date?

The last execution date of the action set.

var actionSetType: String

The type of the action set, such as built-in or user-defined.

let HMActionSetTypeHomeArrival: String

Specifies the HomeArrival built-in action set.

let HMActionSetTypeHomeDeparture: String

Specifies the HomeDeparture built-in action set.

let HMActionSetTypeSleep: String

Specifies the Sleep built-in action set.

let HMActionSetTypeTriggerOwned: String

Specifies a trigger-owned action set.

let HMActionSetTypeUserDefined: String

Specifies a user-defined action set.

let HMActionSetTypeWakeUp: String

Specifies the WakeUp built-in action set.


Inherits From

Conforms To

See Also

Triggers and Actions

class HMTrigger

A trigger event, used to trigger one or more action sets when the conditions of the trigger are satisfied.

class HMTimerTrigger

A trigger based on periodic timers.

class HMCharacteristicWriteAction

An action in an action set that writes a value to a characteristic.

class HMAction

An abstract base class for actions in HomeKit.