---
title: "readAttribute(withEndpointId:clusterId:attributeId:params:clientQueue:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrbasedevice/readattribute(withendpointid:clusterid:attributeid:params:clientqueue:completion:)"
---

# readAttribute(withEndpointId:clusterId:attributeId:params:clientQueue:completion:)

## Declaration

```swift
func readAttribute(withEndpointId endpointId: NSNumber?, clusterId: NSNumber?, attributeId: NSNumber?, params: MTRReadParams?, clientQueue: dispatch_queue_t, completion: @escaping @Sendable ([[String : Any]]?, (any Error)?) -> Void)
```

```swift
func readAttribute(withEndpointId endpointId: NSNumber?, clusterId: NSNumber?, attributeId: NSNumber?, params: MTRReadParams?, clientQueue: dispatch_queue_t) async throws -> [[String : Any]]
```
