---
name: "getLinkageDeviceList"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.14.0" }
title: "device.getLinkageDeviceList - 获取联动设备列表"
---

## getLinkageDeviceList

> [VERSION] Base Library >= 2.14.0

### Description

Get the list of devices in the home that support automation

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `params` | `IGetLinkageDeviceList` | Yes | Query parameters |

### Return Value

Type: `Promise<ILinkageDevice[]>`

List of devices that support automation

##### ILinkageDevice

| Property | Type | Description |
| --- | --- | --- |
| `category` | `string` | Device category |
| `datapoints` | `any[]` | Device DP list |
| `devId` | `string` | Device ID |
| `iconUrl` | `string` | Device icon URL |
| `name` | `string` | Device name |
| `productId` | `string` | Product ID |

### Referenced Types

##### `interface` IGetLinkageDeviceList

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `gid` | `number` | Yes | Home ID |
| `sourceType` | `string` | Yes | Business scope |


### Examples

#### Get the list of automation-capable devices

```ts
ty.getLinkageDeviceList({
  gid: 123456,
  sourceType: 'dp',
}).then((list) => {
  console.log('Linked device list', list);
});
```
