<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMCharacteristic/enableNotification(_:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMCharacteristic(im)enableNotification:completionHandler:"
  },
  "title" : "enableNotification(_:completionHandler:)"
}
-->

# enableNotification(_:completionHandler:)

Enables or disables notifications for changes in the value of the characteristic.

```
func enableNotification(_ enable: Bool, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

## Parameters

`enable`

<doc://com.apple.documentation/documentation/Swift/true> to enable notifications, <doc://com.apple.documentation/documentation/Swift/false> to disable notifications.

`completion`

The block executed after the request is processed.

- error: `nil` on success; otherwise, error object indicating the reason for failure.

## Discussion

HomeKit delivers notifications to the accessory delegate using the [`accessory(_:service:didUpdateValueFor:)`](/documentation/HomeKit/HMAccessoryDelegate/accessory(_:service:didUpdateValueFor:)) method.

---

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)