add(_:queue:)
Adds a delegate to receive asynchronous callbacks about the device.
Declaration
func add(_ delegate: any MTRDeviceDelegate, queue: dispatch_queue_t)Discussion
The delegate will be called on the provided queue, for attribute reports, event reports, and device state changes.
MTRDevice holds a weak reference to the delegate object.