Usage
Single deviceGroup support
Info
The lamp advanced capability SDK standardizes:
- Whether advanced capabilities are enabled
- Color temperature value and unit conversion
- Brightness value and unit conversion
- VAS keypoint information
Get started
SmartLampAdvancedAbility has been available since @ray-js/panel-sdk@1.15.0.
SmartLampAdvancedAbility(props: SmartLampAdvancedAbilityOptions)
Requires:
≥1.15.0
Description
Advanced lighting capability that provides advanced conversion for color temperature/brightness and VAS information queries
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | Initialization configuration for advanced lighting capability |
Return Value
Type: SmartLampAdvancedAbility
SmartLampAdvancedAbility instance
Methods
| Method | Description |
|---|---|
| convertTemperature | Convert color temperature value: if the device has the advanced color temperature capability enabled, return a display value with unit (e.g., 2700K); otherwise return the raw value and an empty unit. |
| convertBrightness | Convert brightness value: if the device has the thousandth-level brightness capability enabled, return a display value with unit; otherwise return the raw value and an empty unit. |
| getAdvancedTemperatureVas | Get advanced color temperature VAS (value-added service) info, including keypoints (display value, raw value, unit) for color-temperature range and display. |
| getAdvancedBrightnessVas | Get advanced brightness (thousandth-level) VAS info, including keypoints, for brightness range and unit display. |
| getAdvanceHighEnabled | Check whether the specified DP’s advanced capability is enabled: supports bright_value (thousandth-level brightness), temp_value (standard color temperature), color_temp_control (Matter color temperature). |
| convertDp | Convert a raw DP value to a display value with unit by DP; supports bright_value, temp_value, color_temp_control. |