getSceneRuleDetail(params: GetSceneRuleDetailParams)
Requires:
@tuya-miniapp/cloud-api≥1.6.0
Description
Query details of a single scene rule
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | Request body (ruleId comes from getSceneListByHomeID or the ruleId returned after saving a scene) |
Return Value
Type: Promise<SceneRuleDetail>
SceneRuleDetail (complete details of a single scene rule)
Referenced Types
interface
SceneRuleDetail`getSceneRuleDetail` returns: full details of a single scene rule| Property | Type | Description |
|---|---|---|
| Action list | ||
arrowIconUrl | string | List arrow icon URL |
attribute | number | Business property flag (as agreed with the cloud) |
auditStatus | number | Review status |
background | string | Scene background image URL |
boundForPanel | boolean | Panel binding |
boundForWiFiPanel | boolean | WiFi panel binding |
categorys | string[] | List of scene category tags |
code | string | Scene/rule code |
commonField | string | General extension field (as agreed with the cloud, typically a serialized object such as `{"subMatchType":1}`) |
| Condition list | ||
containDeviceDelete | boolean | Whether flags related to deleted devices are included |
coverIcon | string | Icon URL |
description | string | Scene description |
deviceIds | string[] | List of associated device IDs |
disableTime | number | Disable-until timestamp (if any, in milliseconds) |
displayColor | string | Background color (without the `#` prefix) |
enabled | boolean | Whether enabled |
forceCloudTrigger | boolean | Whether to force cloud-side triggering |
gmtCreate | number | Creation timestamp (milliseconds) |
gmtModified | number | Last modified timestamp (milliseconds) |
id | string | Scene/Rule ID |
iotAutoAlarm | boolean | IoT automation alert flags |
isAlarmIssue | boolean | Whether this is an alert-based linkage |
isLogicRule | boolean | Whether this is a logic-rule scene |
linkageType | number | Linkage type |
localLinkage | boolean | Whether this is a local linkage |
matchType | number | Match type: 1: Any condition; 2: All conditions; 3: Voting-based matching |
name | string | Scene name |
needCleanGidSid | boolean | Whether to clear associated caches such as gid/sid |
needValidOutOfWork | boolean | Whether to validate non-working hours |
newLocalScene | boolean | Whether the new local scene model is used |
offGwSync | boolean | Gateway synchronization flag |
offGwSyncSuccess | boolean | Whether gateway synchronization succeeded |
orderWeight | number | List sorting weight |
outOfWork | number | Status flags for non-working hours and other states |
ownerId | string | Home ID |
panelType | number | Panel type |
permissionCode | string | Permission code |
roomIds | string[] | List of associated room IDs |
ruleGenre | number | Rule type: 1: Scene; 2: Automation |
ruleSource | number | Rule source channel/system |
ruleType | number | Rule source type 1. System-defined 2. Merchant-defined 3. User-defined 4. Security rule 5. Service-defined |
runtimeEnv | string | Runtime environment (such as `prod`) |
scenarioRule | boolean | Whether to display in the app's Scenes tab |
status | boolean | Scene/rule status |
statusConditions | unknown[] | State-based condition set (structure defined by the cloud) |
stickyOnTop | boolean | Whether to pin to the top |
subMatchType | number | Sub-match type |
uid | string | User ID |