SmartSupportAbility.isSupportDp(dpCode: any, isForce?: boolean)

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

Description

Check whether a given DP code is supported by the device

Parameters

ParameterTypeRequiredDescription
dpCodeanyYesDP code
isForcebooleanNoWhether to bypass the cache and force a check; default: false

Return Value

Type: boolean
Whether this DP is supported

Examples

Example

const hasBright = sdm.support.isSupportDp('bright_value');
const hasSwitch = sdm.support.isSupportDp('switch_led');
console.log('Brightness supported:', hasBright, 'Switch supported:', hasSwitch);