---
name: "getSceneList"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.14.0" }
title: "device.getSceneList - 查询联动规则列表"
---

## getSceneList

> [VERSION] Base Library >= 2.14.0

### Description

Query the list of automation rules in the home, including invalid ones

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `params` | `IGetSceneListOption` | Yes | Query parameters, including device ID and home ID |

### Return Value

Type: `Promise<ISceneListItem[]>`

Automation rule list

##### ISceneListItem

| Property | Type | Description |
| --- | --- | --- |
| `actions` | `any[]` | List of actions to execute |
| `attribute` | `number` | Property: perform bitwise operations using powers of two of enum values |
| `auditStatus` | `number` | Audit status |
| `background` | `string` | Background image URL |
| `boundForPanel` | `boolean` | Whether the panel is bound |
| `boundForWiFiPanel` | `boolean` | Whether the WiFi panel is bound |
| `code` | `string` | Rule code |
| `commonField` | `string` | Generic JSON field |
| `coverIcon` | `string` | Icon |
| `disableTime` | `number` | Disabled time |
| `displayColor` | `string` | Background color |
| `enabled` | `true` | Whether the rule is enabled |
| `devId` | `string` | Device ID |
| `name` | `string` | Automation name |
| `id` | `string` | Rule ID |

### Referenced Types

##### `interface` IGetSceneListOption

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID |
| `gid` | `string` | Home ID |


### Examples

#### Get scene list

```ts
ty.getSceneList({
  devId: 'abc123',
  gid: '456789',
}).then((list) => {
  console.log('Scene list', list);
});
```
