DreamlightSceneModeTransformer(uuid?: string, defaultValue?: { version: number, id: number, mode: number, speed: number, segmented: number, loop: number, excessive: number, direction: number, expand: number, reserved1: number, reserved2: number, brightness: number, colors: SceneColorType[] })
Requires:
@ray-js/panel-sdk≥1.0.0
Description
Addressable light strip scene-mode protocol converter for bidirectional conversion between dynamic scene configuration data and the DP hexadecimal protocol
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | No | DP identifier, defaults to 'dreamlight_scene_mode' |
defaultValue | { version: number, id: number, mode: number, speed: number, segmented: number, loop: number, excessive: number, direction: number, expand: number, reserved1: number, reserved2: number, brightness: number, colors: SceneColorType[] } | No | Default scene data to return when parsing fails |
Return Value
Type: DreamlightSceneModeTransformer
DreamlightSceneModeTransformer instance
Referenced Types
interface
SceneColorType| Property | Type | Required | Description |
|---|---|---|---|
hue | number | Yes | Hue |
saturation | number | Yes | Saturation |
Methods
| Method | Description |
|---|---|
| parser | Parse the DP hexadecimal string into a dreamlight scene-mode data object |
| formatter | Format a dreamlight scene-mode data object into a DP hexadecimal string |