---
title: HMHome
framework: homekit
role: symbol
role_heading: Class
path: homekit/hmhome
---

# HMHome

The primary unit of living space, typically composed of rooms organized into zones.

## Declaration

```swift
class HMHome
```

## Overview

Overview An HMHome instance is a top-level container in HomeKit representing a structure that a user considers as a single home. Users might have multiple homes that are far apart, like a primary home and a vacation home. Or they might have two homes that are close together, but that they consider as distinct units—for example, a main home and a guest cottage on the same property. An HMHome instance: Is the main access point for communicating with and configuring accessories, like a garage door opener or a thermostat. Organizes accessories into a number of rooms, which are themselves optionally grouped into zones, such as the upstairs. Allows the user to define sets of actions that can be performed with a single operation, and triggers that cause an action set to be performed at a specific time. You create a new home only in response to a specific user request, but you don’t do it directly. When the user asks your app to create a new home—for example, by tapping an Add button in your interface—your app calls the home manager’s addHome(withName:completionHandler:) method with a name that the user supplies. To get a list of existing home instances, use the homes array of the home manager (an instance of HMHomeManager). Because HomeKit gives your app access to a shared database of home automation information, other apps can change the home’s configuration. Adopt the HMHomeDelegate protocol in your app to stay informed of any such changes that happen outside your app.

## Topics

### Keeping track of home configuration changes

- [delegate](homekit/hmhome/delegate.md)
- [HMHomeDelegate](homekit/hmhomedelegate.md)

### Identifying a home

- [name](homekit/hmhome/name.md)
- [updateName(_:completionHandler:)](homekit/hmhome/updatename(_:completionhandler:).md)
- [uniqueIdentifier](homekit/hmhome/uniqueidentifier.md)
- [isPrimary](homekit/hmhome/isprimary.md)

### Dividing a house into rooms

- [rooms](homekit/hmhome/rooms.md)
- [roomForEntireHome()](homekit/hmhome/roomforentirehome().md)
- [addRoom(withName:completionHandler:)](homekit/hmhome/addroom(withname:completionhandler:).md)
- [removeRoom(_:completionHandler:)](homekit/hmhome/removeroom(_:completionhandler:).md)
- [HMRoom](homekit/hmroom.md)

### Grouping rooms into zones

- [zones](homekit/hmhome/zones.md)
- [addZone(withName:completionHandler:)](homekit/hmhome/addzone(withname:completionhandler:).md)
- [removeZone(_:completionHandler:)](homekit/hmhome/removezone(_:completionhandler:).md)
- [HMZone](homekit/hmzone.md)

### Managing accessories

- [accessories](homekit/hmhome/accessories.md)
- [addAndSetupAccessories(completionHandler:)](homekit/hmhome/addandsetupaccessories(completionhandler:).md)
- [addAndSetupAccessories(with:completionHandler:)](homekit/hmhome/addandsetupaccessories(with:completionhandler:).md)
- [addAccessory(_:completionHandler:)](homekit/hmhome/addaccessory(_:completionhandler:).md)
- [assignAccessory(_:to:completionHandler:)](homekit/hmhome/assignaccessory(_:to:completionhandler:).md)
- [removeAccessory(_:completionHandler:)](homekit/hmhome/removeaccessory(_:completionhandler:).md)
- [supportsAddingNetworkRouter](homekit/hmhome/supportsaddingnetworkrouter.md)
- [unblockAccessory(_:completionHandler:)](homekit/hmhome/unblockaccessory(_:completionhandler:).md)
- [HMAccessory](homekit/hmaccessory.md)

### Grouping services

- [servicesWithTypes(_:)](homekit/hmhome/serviceswithtypes(_:).md)
- [serviceGroups](homekit/hmhome/servicegroups.md)
- [addServiceGroup(withName:completionHandler:)](homekit/hmhome/addservicegroup(withname:completionhandler:).md)
- [removeServiceGroup(_:completionHandler:)](homekit/hmhome/removeservicegroup(_:completionhandler:).md)
- [HMServiceGroup](homekit/hmservicegroup.md)

### Querying the state of a home hub

- [homeHubState](homekit/hmhome/homehubstate.md)
- [HMHomeHubState](homekit/hmhomehubstate.md)

### Creating action sets

- [actionSets](homekit/hmhome/actionsets.md)
- [addActionSet(withName:completionHandler:)](homekit/hmhome/addactionset(withname:completionhandler:).md)
- [removeActionSet(_:completionHandler:)](homekit/hmhome/removeactionset(_:completionhandler:).md)
- [executeActionSet(_:completionHandler:)](homekit/hmhome/executeactionset(_:completionhandler:).md)
- [builtinActionSet(ofType:)](homekit/hmhome/builtinactionset(oftype:).md)
- [HMActionSet](homekit/hmactionset.md)

### Triggering an action set

- [triggers](homekit/hmhome/triggers.md)
- [addTrigger(_:completionHandler:)](homekit/hmhome/addtrigger(_:completionhandler:).md)
- [removeTrigger(_:completionHandler:)](homekit/hmhome/removetrigger(_:completionhandler:).md)
- [HMTimerTrigger](homekit/hmtimertrigger.md)
- [HMEventTrigger](homekit/hmeventtrigger.md)
- [HMTrigger](homekit/hmtrigger.md)

### Managing users

- [manageUsers(completionHandler:)](homekit/hmhome/manageusers(completionhandler:).md)
- [currentUser](homekit/hmhome/currentuser.md)
- [HMUser](homekit/hmuser.md)

### Controlling user access

- [homeAccessControl(for:)](homekit/hmhome/homeaccesscontrol(for:).md)
- [HMHomeAccessControl](homekit/hmhomeaccesscontrol.md)
- [HMAccessControl](homekit/hmaccesscontrol.md)
- [HMUserFailedAccessoriesKey](homekit/hmuserfailedaccessorieskey.md)

### Deprecated symbols

- [users](homekit/hmhome/users.md)
- [addUser(completionHandler:)](homekit/hmhome/adduser(completionhandler:).md)
- [removeUser(_:completionHandler:)](homekit/hmhome/removeuser(_:completionhandler:).md)

### Instance Properties

- [matterControllerID](homekit/hmhome/mattercontrollerid.md)
- [matterControllerXPCConnectBlock](homekit/hmhome/mattercontrollerxpcconnectblock.md)
- [matterStartupParametersXPCConnectBlock](homekit/hmhome/matterstartupparametersxpcconnectblock.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Working with the home layout

- [homes](homekit/hmhomemanager/homes.md)
