---
title: "init(presenceEventType:presenceUserType:)"
framework: homekit
role: symbol
role_heading: Initializer
path: "homekit/hmpresenceevent/init(presenceeventtype:presenceusertype:)"
---

# init(presenceEventType:presenceUserType:)

Creates a new presence event with the specified event and user presence types.

## Declaration

```swift
init(presenceEventType: HMPresenceEventType, presenceUserType: HMPresenceEventUserType)
```

## Parameters

- `presenceEventType`: The event type that determines when the event fires.
- `presenceUserType`: The user type whose presence triggers the event.

## Return Value

Return Value An initialized presence event.
