---
name: "getSceneList"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.4.61" }
title: "getSceneList"
---

## getSceneList

> [VERSION] @ray-js/ray >= 1.4.61

### Description

Query the Tap-to-Run scenes supported by the device, including invalid and automation rules

### Parameters

`Params`

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

### Return Value

Type: `Promise<ISceneListItem[]>`

Automation rule list

##### ISceneListItem

| Property | Type | Description |
| --- | --- | --- |
| `actions` | `any[]` | Action |
| `attribute` | `number` | Attributes |
| `auditStatus` | `number` | Review status |
| `background` | `string` | Background image URL |
| `boundForPanel` | `boolean` | Panel binding |
| `boundForWiFiPanel` | `boolean` | Wi-Fi panel binding |
| `code` | `string` | Rule code |
| `commonField` | `string` | Common fields |
| `coverIcon` | `string` | Icon |
| `disableTime` | `number` | Disable time |
| `displayColor` | `string` | Background color |
| `enabled` | `true` | Whether the rule is enabled |
| `devId` | `string` | Device ID |
| `name` | `string` | Automation name |
| `id` | `string` | Execution rule ID |

### Referenced Types

##### `interface` ISceneListParams

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


### Examples

```typescript
import { getSceneList } from '@ray-js/ray';

const fetchScenes = async () => {
  try {
    const scenes = await getSceneList({
      devId: 'device_001',
      gid: '12345678',
    });
    console.log('Scene list:', scenes);
  } catch (err) {
    console.error('Query failed:', err);
  }
};
```
