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

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

## Declaration

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

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