addHome(withName:completionHandler:)
Adds a new home to this home manager.
Declaration
func addHome(withName homeName: String, completionHandler completion: @escaping @Sendable (HMHome?, (any Error)?) -> Void)func addHome(named homeName: String) async throws -> HMHomeParameters
- homeName:
The name of the new home. Must not match the name of an existing home.
- completion:
The block executed after the request is processed.
- home
The newly created home; may be
nilif creation failed.- error
nilon success; otherwise, error object indicating the reason for failure.