<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 11.0.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMPresenceEventType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:@E@HMPresenceEventType"
  },
  "title" : "HMPresenceEventType"
}
-->

# HMPresenceEventType

The user presence type that triggers a presence event.

```
enum HMPresenceEventType
```

## Topics

### Specifying presence type

[`case everyEntry`](/documentation/HomeKit/HMPresenceEventType/everyEntry)

Triggers the event every time a user enters the home.

[`case everyExit`](/documentation/HomeKit/HMPresenceEventType/everyExit)

Triggers the event every time a user leaves the home.

[`case firstEntry`](/documentation/HomeKit/HMPresenceEventType/firstEntry)

Triggers an event for the first user entering the home.

[`case lastExit`](/documentation/HomeKit/HMPresenceEventType/lastExit)

Triggers an event when the last user leaves the home.

### Using presence as a predicate

[`static var atHome: HMPresenceEventType`](/documentation/HomeKit/HMPresenceEventType/atHome)

Triggers the event when at least one user is in the home.

[`static var notAtHome: HMPresenceEventType`](/documentation/HomeKit/HMPresenceEventType/notAtHome)

Triggers the event when there are no users in the home.

### Initializers

[`init?(rawValue: UInt)`](/documentation/HomeKit/HMPresenceEventType/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)