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

Defining the Associated Actions

var actions: Set<HMAction>

Set of actions in the action set.

class HMAction

An abstract base class for actions in HomeKit.