Generic Class


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


class HMCharacteristicWriteAction<TargetValueType> : HMAction where TargetValueType : NSCopying


Action sets are instances of HMActionSet.


New Methods

init(characteristic: HMCharacteristic, targetValue: TargetValueType)

Initialize a characteristic write action with a specified characteristic and target value.

var characteristic: HMCharacteristic

The characteristic whose value is to be written by the action.

var targetValue: TargetValueType

The value that will be written to the characteristic when the action is executed.


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 HMActionSet

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

class HMAction

An abstract base class for actions in HomeKit.