removeRoom(_:completionHandler:)
Removes a room from the home.
Declaration
func removeRoom(_ room: HMRoom, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)func removeRoom(_ room: HMRoom) async throwsParameters
- room:
The room to remove.
- completion:
The block executed after the request is processed.
- error
nilon success; otherwise, error object indicating the reason for failure.
Discussion
If the room is in a zone, this method also removes it from the zone. Any accessories in the removed room automatically move to roomForEntireHome().