Contents

removeAccessory(_:completionHandler:)

Removes an accessory from the home.

Declaration

func removeAccessory(_ accessory: HMAccessory, completionHandler completion: @escaping  @Sendable ((any Error)?) -> Void)
func removeAccessory(_ accessory: HMAccessory) async throws

Parameters

  • accessory:

    The accessory to remove.

  • completion:

    The block executed after the request is processed.

    error

    nil on success; otherwise, error object indicating the reason for failure.

See Also

Managing accessories