    final class Home

    extension Home : Sendable, SendableMetatype

Top-level entry to the GoogleHomeSDK.
- `


  ### [configure(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C9configureyyyAA0B19ClientConfigurationVzXEFZ)


  ` Configure App-specific parameters of the GoogleHomeSDK.

  This method should be called before any other Home API method. By default, the configuration
  is read from the Info.plist.

  #### Declaration

  Swift

      @MainActor
      static func configure(_ block: (inout https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeClientConfiguration.html) -> Void)

  #### Parameters

  |---|---|
  | ` block ` | The configuration block. |

- `


  ### [init(account:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C7accountAcA9AccountIDV_tcfc)


  ` Initializes a `Home` instance with for the given User Account.

  #### Declaration

  Swift

      convenience init(account: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AccountID.html)

  #### Parameters

  |---|---|
  | ` account ` | The `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AccountID.html` to use for the `Home` instance. |

- `


  ### [user](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C4userAA8UserInfoVvp)


  ` The user information associated with this `Home` instance.

  #### Declaration

  Swift

      @available(*, deprecated, message: "This API is experimental and is subject to change.")
      var user: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/UserInfo.html { get }

- `


  ### [connect()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C7connectACyYaKFZ)


  ` Creates a new `Home`\` instance connected to the user's account.

  This method first attempts to restore a previous session. If no active session
  is found, it initiates the sign-in flow to authenticate the user.

  #### Declaration

  Swift

      @available(iOSAppExtension, message: "Not supported in app extensions.")
      @MainActor
      static func connect() async throws -> Home

  #### Return Value

  A `Home` instance.
- `


  ### [acceptInvitation(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C16acceptInvitationyACSSYaKFZ)


  ` Signs in the user and accepts an invitation to join a Home structure.

  If the user is not signed in, this launches a Google sign-in UI.
  If the user is signed in with a Google account, this launches a Google UI to accept
  the invitation.
  If the user is signed in with a federated identity, this accepts the invitation without
  invoking a Google UI.
  Throws
  A `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html` if the token is empty, invalid, or if the invitation process fails.

  #### Declaration

  Swift

      @available(iOSAppExtension, message: "Not supported in app extensions.")
      @MainActor
      static func acceptInvitation(_ token: String) async throws -> Home

  #### Parameters

  |---|---|
  | ` token ` | The token required to accept the pending invitation. |

  #### Return Value

  A `Home` instance associated with the accepted invitation.
- `


  ### [migrating(structureID:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C9migrating11structureIDACSS_tYaKFZ)


  ` Authenticates the user and authorizes the migration of an access to existing structure to GHP.

  #### Declaration

  Swift

      @MainActor
      static func migrating(structureID: String) async throws -> Home

  #### Parameters

  |---|---|
  | ` structureID ` | The ID of the structure to be migrated. |

  #### Return Value

  An authorized `Home` instance, authorized for migrating the structure.
- `


  ### [restoreSession()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C14restoreSessionACSgyYaFZ)


  ` Restores a previous session and returns a `Home` instance connected to the user's account.

  If a session is not found, this method will return nil.

  #### Declaration

  Swift

      @MainActor
      static func restoreSession() async -> Home?

  #### Return Value

  A `Home` instance.
- `


  ### [disconnect()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C10disconnectyyYaF)


  ` Disconnects the `Home` instance from the user's account.

  #### Declaration

  Swift

      func disconnect() async

- `


  ### [syncLinkedDevices()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C17syncLinkedDevicesyyYaKF)


  ` Triggers device sync from partner cloud to Google.

  #### Declaration

  Swift

      func syncLinkedDevices() async throws

- `


  ### [listAvailableAgents(pageToken:pageSize:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C19listAvailableAgents9pageToken0G4SizeAA019CloudAccountLinkingeF4PageVSSSg_SiSgtYaKF)


  ` Lists available linkable 3P cloud agents.

  #### Declaration

  Swift

      func listAvailableAgents(pageToken: String? = nil, pageSize: Int? = nil) async throws -> https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/CloudAccountLinkingAvailableAgentsPage.html

  #### Parameters

  |---|---|
  | ` pageToken ` | The token for the next page of results from a previous request. |
  | ` pageSize ` | The maximum number of agents to return. |

  #### Return Value

  A `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/CloudAccountLinkingAvailableAgentsPage.html` containing the agents and next page
  token.
- `


  ### [sendBatchedCommands(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C19sendBatchedCommandsyxxAA14CommandBatcherCYbKXEYaKlF)


  ` Starts a new commands batch, sends it and asynchronously waits for the response.

  #### Declaration

  Swift

      @MainActor
      func sendBatchedCommands<T>(_ block: @Sendable (https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/CommandBatcher.html) throws -> T) async throws -> T

  #### Parameters

  |---|---|
  | ` block ` | A closure that can add commands to the batch and return a result. |

  #### Return Value

  The result of the batch command execution.
- `


  ### [OpenWebViewHandler](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C18OpenWebViewHandlera)


  ` Alias for `openWebView` handler on `startHubActivation()`.

  #### Declaration

  Swift

      typealias OpenWebViewHandler = @MainActor @Sendable (URL, String) async throws -> Void

- `


  ### [discoverAvailableHubs(duration:activatableOnly:shouldContinue:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C21discoverAvailableHubs8duration15activatableOnly14shouldContinueShyAA3HubVGs8DurationV_S2bAJYbctYaF)


  ` Discovers available hubs and returns latest result after a given duration.

  #### Declaration

  Swift

      func discoverAvailableHubs(duration: Duration = .seconds(3), activatableOnly: Bool = true, shouldContinue: @escaping @Sendable (Set<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Hub.html>) -> Bool = { _ in true }) async -> Set<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Hub.html>

  #### Parameters

  |---|---|
  | ` duration ` | Continues to discover until this duration has passed as long as `shouldContinue` returns `true`. Default is 3 seconds. |
  | ` activatableOnly ` | If `true`, only hubs that can be passed to `startHubActivation()` will be returned, otherwise all discovered hubs will be returned. Default is `true`. |
  | ` shouldContinue ` | A handler will be called every time mDNS discovery receives updates. Default is a handler that always returns `true`. if the handler returns `false`, the discovery will be stopped and returns latest discovered hubs immediately. |

  #### Return Value

  A set of hubs that are available.
- `


  ### [startHubActivation(_:structureID:roomID:additionalQueryItems:openWebView:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C18startHubActivation_11structureID04roomH020additionalQueryItems11openWebViewyAA0E0V_S2SSgSay10Foundation12URLQueryItemVGyAL3URLV_SStYaYbKScMYccSgtYaKF)


  ` Starts hub activation with the given hub.

  #### Declaration

  Swift

      func startHubActivation(_ hub: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Hub.html, structureID: String, roomID: String? = nil, additionalQueryItems items: [URLQueryItem] = [], openWebView: Home.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home.html#/s:13GoogleHomeSDK0B0C18OpenWebViewHandlera? = nil) async throws

  #### Parameters

  |---|---|
  | ` hub ` | The hub to be used for commissioning. |
  | ` structureID ` | The ID of the structure to add the hub to. |
  | ` roomID ` | The ID of the room to add the hub to. Default is `nil` and if it's nil web page will show the room list to let user choose a room. |
  | ` additionalQueryItems ` | All parameters will be added to the URL to be opened by web view. Default is an empty. |
  | ` openWebView ` | A handler that opens a web view with the given URL and returns after the web view is closed. Default is `nil`. If this handler is `nil`, the web page will be opened using `ASWebAuthenticationSession`. The `callbackURLScheme` parameter will be redirected by the web page, allowing the caller to close the web view. |

- `


  ### [setLocale(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C9setLocaleyy10Foundation0E0VYaKFZ)


  ` Sets the active locale for this application.
  Throws
  An error if updating user application settings fails.

  #### Declaration

  Swift

      static func setLocale(_ locale: Locale) async throws

  #### Parameters

  |---|---|
  | ` locale ` | `Locale` to set for the application. |

- `


  ### [getLocale()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C9getLocale10Foundation0E0VSgyFZ)


  ` Returns the active locale configured for this application, if any.

  #### Declaration

  Swift

      static func getLocale() -> Locale?

- `


  ### [presentPermissionsUpdate()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C24presentPermissionsUpdateyyF)


  ` Presents a view for users to update the permissions granted to the Home SDK.

  If the active user is signed into Safari, the permissions view will be presented for that
  user. Otherwise, the user will be prompted to select an account or sign in.

  #### Declaration

  Swift

      @available(*, deprecated, message: "Use `Home.permissions` instead.")
      @MainActor
      func presentPermissionsUpdate()

- `


  ### [permissions](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C11permissionsAA31UserScopedPermissionsControllerVvp)


  ` Returns a controller for interacting with user-scoped permissions.

  #### Declaration

  Swift

      var permissions: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/UserScopedPermissionsController.html { get }

- `


  ### [sdkVersion](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C10sdkVersionSSvpZ)


  ` The version of the SDK; follows the Semantic Versioning 2.0 standard.

  #### Declaration

  Swift

      @available(*, deprecated, message: "Use 'Home.version' instead for clarity.")
      static var sdkVersion: String { get }

- `


  ### [version](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C7versionAC7VersionVvpZ)


  ` Version information about the SDK.

  #### Declaration

  Swift

      static let version: Home.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home/Version.html

- `


  ### [Version](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home/Version.html)


  ` Version information about the SDK.

  #### Declaration

  Swift

      struct Version

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home.html.Version : CustomDebugStringConvertible, CustomStringConvertible, Sendable, SendableMetatype

- `


  ### [identifier](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C10identifierSSvp)


  ` The unique identifier for this `Home` instance, stable across all sessions.

  #### Declaration

  Swift

      var identifier: String { get }

- `


  ### [devices()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C7devicesQryF)


  ` Query all devices visible to this account.

  #### Declaration

  Swift

      func devices() -> some https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query.html<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html>

- `


  ### [device(id:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C6device2idQrSS_tF)


  ` Returns a Publisher for a specified device that emits the current state and again on any
  future state updates.

  #### Declaration

  Swift

      func device(id: String) -> some Publisher<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html>

- `


  ### [devices(enableMultipartDevices:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C7devices22enableMultipartDevicesQrSb_tF)


  ` Query all devices visible to this account.

  #### Declaration

  Swift

      func devices(enableMultipartDevices: Bool) -> some https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query.html<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html>

- `


  ### [device(id:enableMultipartDevices:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C6device2id22enableMultipartDevicesQrSS_SbtF)


  ` Returns a Publisher for a specified device that emits the current state and again on any
  future state updates.

  #### Declaration

  Swift

      func device(id: String, enableMultipartDevices: Bool) -> some Publisher<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html>

- `


  ### [structures()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C10structuresQryF)


  ` Query all structures visible to this account.

  #### Declaration

  Swift

      func structures() -> some https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructuresController.html

- `


  ### [structure(id:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C9structure2idQrSS_tF)


  ` future state updates.

  #### Declaration

  Swift

      func structure(id: String) -> some Publisher<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Structure.html, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html>

- `


  ### [rooms()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C5roomsQryF)


  ` Query all rooms visible to this account.

  #### Declaration

  Swift

      func rooms() -> some https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query.html<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Room.html>

- `


  ### [room(id:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C4room2idQrSS_tF)


  ` Returns a Publisher for a specified room that emits the current state and again on any
  future state updates.

  #### Declaration

  Swift

      func room(id: String) -> some Publisher<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Room.html, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html>

- `


  ### [entities(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home#/s:13GoogleHomeSDK0B0C8entitiesyAA5Query_px7ElementRts_XPxmAA0B6EntityRzlF)


  ` Queries all entities of the specified type in the home.

  #### Declaration

  Swift

      func entities<T>(_ type: T.Type = T.self) -> any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query.html<T> where T : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/HomeEntity.html