---
title: "init(id:label:isEnabled:defaultValue:currentValue:style:)"
framework: HomeExtensions
role: symbol
role_heading: Initializer
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+]
path: "homeextensions/homeaccessoryenumsetting/init(id:label:isenabled:defaultvalue:currentvalue:style:)"
---

# init(id:label:isEnabled:defaultValue:currentValue:style:)

Creates an enumeration setting.

## Declaration

```swift
init(id: String, label: HomeAccessorySettingLabel, isEnabled: Bool = true, defaultValue: Value? = nil, currentValue: Value? = nil, style: HomeAccessoryEnumSetting<Value>.SelectionStyle = .inline)
```

## Parameters

- `id`: A unique identifier for the setting.
- `label`: The setting’s label.
- `isEnabled`: A Boolean value that indicates whether people can change the setting. The default is true.
- `defaultValue`: The option to use when nothing is selected.
- `currentValue`: The selected option.
- `style`: The style for presenting the options. The default is doc://com.apple.HomeExtensions/documentation/HomeExtensions/HomeAccessoryEnumSetting/SelectionStyle/inline.

## See Also

### Creating an enumeration setting

- [HomeAccessoryEnumSetting.SelectionStyle](homeextensions/homeaccessoryenumsetting/selectionstyle.md)
