---
name: "openCreateScene"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.15.3" }
title: "ty.device.openCreateScene - 跳转创建场景页面"
---

## openCreateScene

> [VERSION] Base Library >= 2.15.3

> 💡 Currently, only Zigbee local scenes are supported on Android. The IDE emulator and on-device debugging are not available.
> Supports both callback and Promise styles: when success/fail/complete is provided, callbacks are used; otherwise a Promise is returned.

### Description

Navigate to the scene creation page

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `option` | `OpenCreateSceneOption` | No | Configuration parameters |

### Return Value

Type: `Promise<void>`

Returns a Promise when no callback is provided; if success/fail/complete is passed, uses callbacks and returns undefined

### Referenced Types

##### `interface` OpenCreateSceneOption

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID (supported on Android in App 5.10.0 and later) |
| `success` | `() => void` | Success callback |
| `fail` | `(err: Object) => void` | Callback on failure |
| `complete` | `() => void` | Callback on complete (success or failure) |

##### `type` OpenCreateSceneOption.fail.err

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` |  |
| `errorCode` | `string` |  |


### Examples

#### Open the scene creation page

```ts
ty.device.openCreateScene({
  devId: 'devId',
}).then(() => {
  console.log('Successfully opened the create scene page');
});
```
