<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMCharacteristicEvent/init(characteristic:triggerValue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMCharacteristicEvent(im)initWithCharacteristic:triggerValue:"
  },
  "title" : "init(characteristic:triggerValue:)"
}
-->

# init(characteristic:triggerValue:)

Creates a new characteristic event which triggers when the specified characteristic reaches the specified value.

```
init(characteristic: HMCharacteristic, triggerValue: TriggerValueType?)
```

## Parameters

`characteristic`

The characteristic that the event is observing.

`triggerValue`

The value of the characteristic that triggers the event. Specifying `nil` causes the event to fire every time the value of the characteristic changes.

## Return Value

An initialized characteristic event for the specified characteristic and trigger value.

## Discussion

Use a characteristic that supports notification; otherwise this initializer throws an exception.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)