<!--
{
  "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/HMAccessory",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMAccessory"
  },
  "title" : "HMAccessory"
}
-->

# HMAccessory

A home automation accessory, like a garage door opener or a thermostat.

```
class HMAccessory
```

## Overview

An [`HMAccessory`](/documentation/HomeKit/HMAccessory) instance represents a physical device, like a garage door opener, installed in a home and assigned to a room.

You don’t create accessories directly. Instead you get them from the [`accessories`](/documentation/HomeKit/HMHome/accessories) array of an [`HMHome`](/documentation/HomeKit/HMHome) instance when you want all the accessories in a home, or the [`accessories`](/documentation/HomeKit/HMRoom/accessories) array of an [`HMRoom`](/documentation/HomeKit/HMRoom) instance when you want all the accessories in a particular room. Each physical accessory in the home is represented by exactly one accessory instance, so that one instance appears in both a home and a room collection. This is because it’s simultaneously part of the home and in one of the home’s rooms.

When you want to add new accessories, you call the home’s [`addAndSetupAccessories(completionHandler:)`](/documentation/HomeKit/HMHome/addAndSetupAccessories(completionHandler:)) method. In response, HomeKit presents the user with an interface that steps through the process of searching for new accessories in the physical environment, naming them, and assigning them to a room.

Accessories provide one or more services, represented by instances of [`HMService`](/documentation/HomeKit/HMService), that are the features that the user can control, like the light attached to a garage door opener, or the door opener mechanism itself.

## Topics

### Tracking changes to an accessory

[`delegate`](/documentation/HomeKit/HMAccessory/delegate)

A delegate that receives updates on the state of the accessory.

[`HMAccessoryDelegate`](/documentation/HomeKit/HMAccessoryDelegate)

A set of methods that defines the communication method for state updates from accessories to their delegates.

### Identifying an Accessory

[`name`](/documentation/HomeKit/HMAccessory/name)

The name of the accessory.

[`-  updateName:completionHandler:`](/documentation/HomeKit/HMAccessory/updateName(_:completionHandler:))

Changes the name of the accessory.

[`uniqueIdentifier`](/documentation/HomeKit/HMAccessory/uniqueIdentifier)

A unique identifier for the accessory.

[`identifier`](/documentation/HomeKit/HMAccessory/identifier)

A unique identifier for the accessory.

### Categorizing an accessory

[`category`](/documentation/HomeKit/HMAccessory/category)

The category to which the accessory belongs.

[`HMAccessoryCategory`](/documentation/HomeKit/HMAccessoryCategory)

A category for a HomeKit accessory.

### Locating an accessory

[`room`](/documentation/HomeKit/HMAccessory/room)

The room containing the accessory.

[`HMRoom`](/documentation/HomeKit/HMRoom)

The smallest subdivision of a home’s space.

### Managing accessory profiles

[`profiles`](/documentation/HomeKit/HMAccessory/profiles)

An array of profiles implemented by the accessory.

[`HMAccessoryProfile`](/documentation/HomeKit/HMAccessoryProfile)

A profile that certain accessories implement.

[`HMNetworkConfigurationProfile`](/documentation/HomeKit/HMNetworkConfigurationProfile)

A profile that provides information about network protection for an accessory.

[`HMCameraProfile`](/documentation/HomeKit/HMCameraProfile)

A camera profile that interacts with an accessory’s camera.

### Managing camera profiles

[`CameraView`](/documentation/HomeKit/CameraView)

A SwiftUI view into which a video stream or an image snapshot is rendered.

[`cameraProfiles`](/documentation/HomeKit/HMAccessory/cameraProfiles)

An array of camera profiles implemented by the accessory.

[`HMCameraProfile`](/documentation/HomeKit/HMCameraProfile)

A camera profile that interacts with an accessory’s camera.

[`HMCameraView`](/documentation/HomeKit/HMCameraView)

The view into which a video stream or an image snapshot is rendered.

### Getting accessory state

[`reachable`](/documentation/HomeKit/HMAccessory/isReachable)

A Boolean value indicating whether the accessory can be communicated with in the current network environment.

[`blocked`](/documentation/HomeKit/HMAccessory/isBlocked)

A Boolean value indicating whether the accessory is blocked.

### Asking an accessory to identify itself

[`supportsIdentify`](/documentation/HomeKit/HMAccessory/supportsIdentify)

A Boolean value that indicates whether the accessory supports the identify action.

[`-  identifyWithCompletionHandler:`](/documentation/HomeKit/HMAccessory/identify(completionHandler:))

Asks an accessory to identify itself.

### Controlling accessory features

[`services`](/documentation/HomeKit/HMAccessory/services)

An array of services provided by the accessory.

[`HMService`](/documentation/HomeKit/HMService)

A controllable feature of an accessory, like a light attached to a garage door opener.

### Managing bridged accessories

[`bridged`](/documentation/HomeKit/HMAccessory/isBridged)

A Boolean that indicates whether the accessory is accessed through a bridge.

[`uniqueIdentifiersForBridgedAccessories`](/documentation/HomeKit/HMAccessory/uniqueIdentifiersForBridgedAccessories)

An array of unique identifiers, each of which represents an accessory vended by the bridge.

[`identifiersForBridgedAccessories`](/documentation/HomeKit/HMAccessory/identifiersForBridgedAccessories)

An array of identifiers for accessories available through a bridge.

### Getting manufacturer information

[`firmwareVersion`](/documentation/HomeKit/HMAccessory/firmwareVersion)

The firmware version of the accessory.

[`manufacturer`](/documentation/HomeKit/HMAccessory/manufacturer)

The manufacturer of the accessory.

[`model`](/documentation/HomeKit/HMAccessory/model)

The model name of the accessory.

### Browsing for accessories

[`HMAccessoryBrowser`](/documentation/HomeKit/HMAccessoryBrowser)

A network browser you can use to discover new accessories in a home.

### Instance Properties

[`matterNodeID`](/documentation/HomeKit/HMAccessory/matterNodeID-67v1j)

[`matterNodeID`](/documentation/HomeKit/HMAccessory/matterNodeID-5zfqo)

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)