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


This class defines the basic behavior of triggers, but does not itself specify any criteria for firing a trigger. You should use instances of subclasses of HMTrigger to set up concrete triggers for actions.


Managing Triggers

var name: String

The name of the trigger.

var isEnabled: Bool

State of the trigger.

func enable(Bool, completionHandler: (Error?) -> Void)

Changes the enabled state of the trigger.

var lastFireDate: Date?

The last time this trigger fired.

var uniqueIdentifier: UUID

A unique identifier for this trigger.

Managing Action Sets

var actionSets: [HMActionSet]

Array of all action sets that will be executed by the trigger.


Inherits From

Conforms To

See Also

Triggers and Actions

class HMTimerTrigger

A trigger based on periodic timers.

class HMActionSet

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

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.