SmartGroupModel.getDpSchema()

Requires:
@ray-js/panel-sdk≥1.5.0

Description

Get the DP Schema (DP capability descriptions) mapping table for the smart group

Parameters

None

Return Value

Type: Record<string, DpSchema>
Capability model mapping object where the key is the DP code and the value includes attr, mode, property, type, etc.

Referenced Types

interfaceDpSchema
PropertyTypeDescription
attrnumberDP attribute flag bit, used to mark additional capabilities of the DP
canTriggerbooleanWhether it can be used as an automation trigger condition
codestringDP code, e.g., switch
defaultRecommendbooleanWhether it is the default recommended DP
editPermissionbooleanWhether it has edit permission
executablebooleanWhether it can be issued (sent downstream)
extContentstringDP extension content, typically a JSON string
iconnamestringDP icon name
idstring | numberDP ID
mode"rw" | "ro" | "wr"DP mode type
rw: writable and reportable (read/write)
ro: report-only (read-only)
wr: write-only
namestringDP name, typically used in voice scenarios
DP attributes
type"raw" | "obj"DP data type categories: raw for raw byte stream, obj for structured object

Examples

Example

const dpSchema = group.getDpSchema();
console.log(dpSchema.switch_led.property.type); // 'bool'