ColorControl Cluster
Cluster ID: 0x0300 |
Endpoint: Typically on Endpoint 1 (application endpoint, same endpoint as OnOff / LevelControl)
ColorControl is the core color control Cluster for Matter lighting devices, supporting three color models: Hue/Saturation, XY Chromaticity (CIE 1931), and Color Temperature (in Mireds). It also supports advanced features like Enhanced Hue (16-bit high-precision hue) and Color Loop (automatic color cycling).
Matter uses Mireds (micro reciprocal degrees) as the color temperature unit. Conversion formula: Mireds = 1,000,000 / Kelvin.
For example, 6500K cool white ≈ 153 Mireds, 2700K warm white ≈ 370 Mireds. Lower Mireds = higher color temperature (cooler white); higher Mireds = lower color temperature (warmer yellow).
Features (Feature Map)
ColorControl uses the Feature Map to declare which color control capabilities the device supports. Different capabilities determine the available command and attribute sets.
Read ColorCapabilities (0x400A) to get the device's capability bitmap.
Most home smart lights support at least CT (color temperature), while full-color lights typically support HS + XY + CT. Always check ColorCapabilities before sending commands -- sending a command for an unsupported capability will be rejected by the device.
Commands
ColorControl defines 19 commands, organized into five groups by color model: Hue/Saturation control, XY chromaticity control, Color Temperature control, Enhanced Hue control, and Color Loop control. Click a command ID in the table below to jump to its detailed description.
All commands support OptionsMask and OptionsOverride parameters for temporarily overriding the ExecuteIfOff flag in the Options (0x000F) attribute.
| ID | Name | Description | Required Feature |
|---|---|---|---|
0x00 |
MoveToHue | Move to a specified hue | HS |
0x01 |
MoveHue | Continuously move hue in a specified direction | HS |
0x02 |
StepHue | Step hue | HS |
0x03 |
MoveToSaturation | Move to a specified saturation | HS |
0x04 |
MoveSaturation | Continuously move saturation in a specified direction | HS |
0x05 |
StepSaturation | Step saturation | HS |
0x06 |
MoveToHueAndSaturation | Set hue and saturation simultaneously | HS |
0x07 |
MoveToColor | Move to specified XY chromaticity coordinates | XY |
0x08 |
MoveColor | Continuously move XY chromaticity | XY |
0x09 |
StepColor | Step XY chromaticity | XY |
0x0A |
MoveToColorTemperature | Move to a specified color temperature | CT |
0x4B |
MoveColorTemperature | Continuously move color temperature in a specified direction | CT |
0x4C |
StepColorTemperature | Step color temperature | CT |
0x40 |
EnhancedMoveToHue | Move to a specified Enhanced Hue (16-bit) | EHUE |
0x41 |
EnhancedMoveHue | Continuously move Enhanced Hue | EHUE |
0x42 |
EnhancedStepHue | Step Enhanced Hue | EHUE |
0x43 |
EnhancedMoveToHueAndSaturation | Set Enhanced Hue and Saturation simultaneously | EHUE |
0x44 |
ColorLoopSet | Configure and activate/deactivate Color Loop | CL |
0x47 |
StopMoveStep | Stop the current Move or Step transition | HS XY CT |
MoveToHue (0x00)
Smoothly transitions the light's hue to a target value. Hue ranges from 0~254, mapping to the 0°~360° color wheel. The Direction parameter controls the transition direction on the color wheel.
| Parameter | Type | Description |
|---|---|---|
| Hue | uint8 | Target hue value, 0~254 |
| Direction | DirectionEnum | Transition direction: ShortestDistance / LongestDistance / Up / Down |
| TransitionTime | uint16 | Transition time in 1/10 seconds |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
Usage Scenarios & Parameters
Called when the user selects a color on the app's color wheel. Convert the selected angle to a Hue value of 0~254 (hue = angle * 254 / 360). Direction is typically Shortest (0) for the shortest path. TransitionTime of 10 means a 1-second smooth transition.
MoveHue (0x01)
Continuously moves the hue at a constant rate until a StopMoveStep command is received or the hue reaches its natural boundary.
| Parameter | Type | Description |
|---|---|---|
| MoveMode | MoveModeEnum | Move mode: Stop / Up / Down |
| Rate | uint8 | Hue steps per second |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
Usage Scenarios & Parameters
Continuous adjustment while the user holds down the hue adjustment button. Send StopMoveStep (0x47) to stop when the button is released.
StepHue (0x02)
Increases or decreases the hue by a specified step value.
| Parameter | Type | Description |
|---|---|---|
| StepMode | StepModeEnum | Step direction: Up / Down |
| StepSize | uint8 | Hue change per step |
| TransitionTime | uint8 | Transition time, in 1/10 seconds |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
MoveToSaturation (0x03)
Smoothly transitions the light's saturation to a target value. Saturation ranges from 0~254, where 0 is colorless (white light) and 254 is maximum saturation.
| Parameter | Type | Description |
|---|---|---|
| Saturation | uint8 | Target saturation, 0~254 |
| TransitionTime | uint16 | Transition time, in 1/10 seconds |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
Usage Scenarios & Parameters
Called when the user drags the saturation slider. Saturation values 0~254 correspond to 0%~100% on the UI. Typically used alongside MoveToHue, or use MoveToHueAndSaturation to set both at once.
MoveSaturation (0x04)
Continuously moves the saturation at a constant rate until a StopMoveStep is received. Parameter structure is the same as MoveHue.
StepSaturation (0x05)
Increases or decreases saturation by a specified step value. Parameter structure is the same as StepHue.
MoveToHueAndSaturation (0x06)
Sets both hue and saturation in a single command, more efficient and smoother than sending two separate commands.
| Parameter | Type | Description |
|---|---|---|
| Hue | uint8 | Target hue value, 0~254 |
| Saturation | uint8 | Target saturation, 0~254 |
| TransitionTime | uint16 | Transition time, in 1/10 seconds |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
Usage Scenarios & Parameters
Called when the user selects a color point directly on the Color Wheel, completing both hue and saturation setting in one command. Recommended over calling MoveToHue + MoveToSaturation separately.
MoveToColor (0x07)
Transitions the light's color to specified CIE 1931 XY chromaticity coordinates. X and Y range from 0~0xFEFF, mapping to 0.0~1.0 chromaticity values.
| Parameter | Type | Description |
|---|---|---|
| ColorX | uint16 | CIE x coordinate, 0~0xFEFF (actual value = ColorX / 65536) |
| ColorY | uint16 | CIE y coordinate, 0~0xFEFF (actual value = ColorY / 65536) |
| TransitionTime | uint16 | Transition time, in 1/10 seconds |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
Usage Scenarios & Parameters
Used when precise color control is needed (e.g. matching brand colors or lighting design schemes). XY chromaticity is a device-independent absolute color representation -- different manufacturers' lights should theoretically produce the same color at the same XY values.
MoveColor (0x08)
Continuously moves at a constant rate on the XY chromaticity plane.
| Parameter | Type | Description |
|---|---|---|
| RateX | int16 | X coordinate change per second (signed) |
| RateY | int16 | Y coordinate change per second (signed) |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
StepColor (0x09)
Increases/decreases both X and Y coordinates by a step value.
| Parameter | Type | Description |
|---|---|---|
| StepX | int16 | X coordinate step amount (signed) |
| StepY | int16 | Y coordinate step amount (signed) |
| TransitionTime | uint16 | Transition time, in 1/10 seconds |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
MoveToColorTemperature (0x0A)
Smoothly transitions the light's color temperature to a target value. The target is clamped to the [ColorTempPhysicalMinMireds, ColorTempPhysicalMaxMireds] range.
This is the most commonly used command for color temperature lights.
| Parameter | Type | Description |
|---|---|---|
| ColorTemperatureMireds | uint16 | Target color temperature (Mireds) |
| TransitionTime | uint16 | Transition time, in 1/10 seconds |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
Usage Scenarios & Parameters
Called when the user drags the color temperature slider. The UI typically displays Kelvin (2700K ~ 6500K); convert before sending: mireds = 1000000 / kelvin. The device automatically clamps values outside the physical range to Min/Max Mireds.
MoveColorTemperature (0x4B)
Continuously moves the color temperature at a constant rate, with configurable upper and lower bounds.
| Parameter | Type | Description |
|---|---|---|
| MoveMode | MoveModeEnum | Move mode: Stop / Up / Down |
| Rate | uint16 | Mireds change per second |
| ColorTemperatureMinimumMireds | uint16 | Minimum bound for movement |
| ColorTemperatureMaximumMireds | uint16 | Maximum bound for movement |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
StepColorTemperature (0x4C)
Increases or decreases the color temperature by a specified step value, with configurable upper and lower bounds.
| Parameter | Type | Description |
|---|---|---|
| StepMode | StepModeEnum | Step direction: Up / Down |
| StepSize | uint16 | Mireds change per step |
| TransitionTime | uint16 | Transition time, in 1/10 seconds |
| ColorTemperatureMinimumMireds | uint16 | Minimum bound for stepping |
| ColorTemperatureMaximumMireds | uint16 | Maximum bound for stepping |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
EnhancedMoveToHue (0x40)
Similar to MoveToHue, but uses 16-bit Enhanced Hue (0~0xFFFF) with 256 times the precision of standard Hue. Suitable for scenarios requiring fine-grained color control.
| Parameter | Type | Description |
|---|---|---|
| EnhancedHue | uint16 | Target Enhanced Hue value, 0~0xFFFF |
| Direction | DirectionEnum | Transition direction |
| TransitionTime | uint16 | Transition time, in 1/10 seconds |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
Usage Scenarios & Parameters
Used when 254-step precision of 8-bit Hue is insufficient (e.g. large LED strips requiring ultra-smooth transitions). Enhanced Hue = standard Hue * 256, but with a larger range (0~65535). Check for EHUE feature support before sending.
EnhancedMoveHue (0x41)
Continuously moves the Enhanced Hue at a constant rate. Parameter structure is similar to MoveHue, but Rate is uint16.
EnhancedStepHue (0x42)
Increases or decreases Enhanced Hue by a specified step value. Parameter structure is similar to StepHue, but StepSize is uint16.
EnhancedMoveToHueAndSaturation (0x43)
Sets 16-bit Enhanced Hue and 8-bit Saturation in a single command.
| Parameter | Type | Description |
|---|---|---|
| EnhancedHue | uint16 | Target Enhanced Hue value |
| Saturation | uint8 | Target saturation, 0~254 |
| TransitionTime | uint16 | Transition time, in 1/10 seconds |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
ColorLoopSet (0x44)
Configures and activates/deactivates the Color Loop (automatic color cycling). The UpdateFlags bitmap controls which parameters this command updates. Once activated, the light automatically cycles through the color wheel at the configured time period.
| Parameter | Type | Description |
|---|---|---|
| UpdateFlags | UpdateFlagsBitmap | Specifies which fields to update (see bitmap below) |
| Action | ColorLoopActionEnum | Loop action: Deactivate / Start from start hue / Start from current hue |
| Direction | ColorLoopDirectionEnum | Loop direction: Decrement / Increment |
| Time | uint16 | Time to complete one loop cycle (seconds) |
| StartHue | uint16 | Starting Enhanced Hue value for the loop |
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
Usage Scenarios & Parameters
Ambient lighting, party mode, and other scenarios requiring automatic color changes. Set UpdateFlags to 0x0F (update all), Action to 2 (start cycling from current hue), Time to 30 (30 seconds per cycle), Direction to 1 (increment). Set Action to 0 to deactivate.
StopMoveStep (0x47)
Immediately stops any ongoing Move or Step color transition. The light remains at its current color state. Applies to all color models (HS, XY, CT).
| Parameter | Type | Description |
|---|---|---|
| OptionsMask | bitmap8 | Options mask |
| OptionsOverride | bitmap8 | Options override |
Usage Scenarios & Parameters
Sent when the user releases a continuous adjustment button (such as long-pressing the color temperature slider arrow). Used to stop continuous move commands like MoveHue / MoveSaturation / MoveColor / MoveColorTemperature.
Attributes
The ColorControl Cluster has 52 attributes organized into six groups. Click an attribute ID in the summary table below to jump to its detailed description.
| ID | Name | Type | Group | Description |
|---|---|---|---|---|
0x0000 |
CurrentHue | uint8 | Current Color State | Current hue value (0~254) |
0x0001 |
CurrentSaturation | uint8 | Current Color State | Current saturation (0~254) |
0x0002 |
RemainingTime | uint16 | Current Color State | Remaining time of current transition (1/10 seconds) |
0x0003 |
CurrentX | uint16 | Current Color State | Current CIE x coordinate |
0x0004 |
CurrentY | uint16 | Current Color State | Current CIE y coordinate |
0x0007 |
ColorTemperatureMireds | uint16 | Current Color State | Current color temperature (Mireds) |
0x0008 |
ColorMode | enum8 | Color Mode | Current color mode |
0x000F |
Options | bitmap8 | Color Mode | ExecuteIfOff option |
0x4001 |
EnhancedColorMode | enum8 | Color Mode | Enhanced color mode (includes Enhanced Hue) |
0x4000 |
EnhancedCurrentHue | uint16 | Enhanced Hue & Color Loop | Current Enhanced Hue value (16-bit) |
0x4002 |
ColorLoopActive | uint8 | Enhanced Hue & Color Loop | Whether Color Loop is active |
0x4003 |
ColorLoopDirection | uint8 | Enhanced Hue & Color Loop | Color Loop direction |
0x4004 |
ColorLoopTime | uint16 | Enhanced Hue & Color Loop | Time to complete one loop (seconds) |
0x4005 |
ColorLoopStartEnhancedHue | uint16 | Enhanced Hue & Color Loop | Loop start Enhanced Hue |
0x4006 |
ColorLoopStoredEnhancedHue | uint16 | Enhanced Hue & Color Loop | Enhanced Hue restored when loop deactivates |
0x400A |
ColorCapabilities | bitmap16 | Capabilities & CT Range | Color capabilities supported by the device |
0x400B |
ColorTempPhysicalMinMireds | uint16 | Capabilities & CT Range | Physical minimum color temperature (Mireds) |
0x400C |
ColorTempPhysicalMaxMireds | uint16 | Capabilities & CT Range | Physical maximum color temperature (Mireds) |
0x400D |
CoupleColorTempToLevelMinMireds | uint16 | Capabilities & CT Range | Minimum Mireds for color temp to level coupling |
0x4010 |
StartUpColorTemperatureMireds | uint16 / null | Capabilities & CT Range | Power-on default color temperature |
0x0005 |
DriftCompensation | enum8 | Drift Compensation & Fixture Info | Color drift compensation type |
0x0006 |
CompensationText | string | Drift Compensation & Fixture Info | Compensation mechanism description text |
0x0010 |
NumberOfPrimaries | uint8 / null | Drift Compensation & Fixture Info | Number of fixture primaries |
0x0011~0x002A |
Primary1~6 (X/Y/Intensity) | uint16 / uint8 | Primary Coordinates | CIE XY coordinates and intensity for 6 primaries |
0x0030~0x003C |
WhitePoint / ColorPoint R/G/B | uint16 / uint8 | White Point & Color Points | White point coordinates, RGB color point coordinates and intensity |
Current Color State
Reflects the light's current color parameters and serves as the core data source for app UI display and state synchronization.
| ID | Name | Type | Description |
|---|---|---|---|
0x0000 |
CurrentHue Current Hue |
uint8 | Current hue value, 0~254 mapping to the 0°~360° color wheel. Requires HS feature |
0x0001 |
CurrentSaturation Current Saturation |
uint8 | Current saturation, 0~254. 0 = white light, 254 = maximum saturation. Requires HS feature |
0x0002 |
RemainingTime Remaining Transition Time |
uint16 | Remaining time for the current color transition, in 1/10 seconds. 0 means no transition in progress |
0x0003 |
CurrentX Current X |
uint16 | Current CIE 1931 x chromaticity coordinate, 0~0xFEFF. Actual value = CurrentX / 65536. Requires XY feature |
0x0004 |
CurrentY Current Y |
uint16 | Current CIE 1931 y chromaticity coordinate, 0~0xFEFF. Actual value = CurrentY / 65536. Requires XY feature |
0x0007 |
ColorTemperatureMireds Current CT |
uint16 | Current color temperature in Mireds. Range is determined by the physical limit attributes. Requires CT feature |
Matter's Hue value range is 0~254 (not 0~255 or 0~360). Conversion formulas: angle = Hue * 360 / 254, Hue = angle * 254 / 360.
Similarly, Saturation is also 0~254. The UI typically shows a percentage: percentage = Saturation * 100 / 254.
Color Mode & Options
Identifies the color control model currently in use and command execution options.
| ID | Name | Type | Description |
|---|---|---|---|
0x0008 |
ColorMode Color Mode |
enum8 | Current color mode, read-only. The device switches automatically after different color commands are sent |
0x000F |
Options Options |
bitmap8 | Bit 0 = ExecuteIfOff: whether color commands are still executed when the light is off. Read/Write |
0x4001 |
EnhancedColorMode Enhanced Color Mode |
enum8 | Has one more state than ColorMode: Enhanced Hue and Saturation. Read-only |
ColorMode Enum Values
EnhancedColorMode Enum Values
ColorMode only has 3 values (0/1/2) and is a legacy compatibility attribute. EnhancedColorMode adds a 4th value (3 = Enhanced Hue) and is the attribute you should read first to determine the device's current color mode.
After sending MoveToHue, ColorMode becomes 0; after sending EnhancedMoveToHue, EnhancedColorMode becomes 3.
Enhanced Hue & Color Loop
State attributes for high-precision hue control and automatic color cycling.
| ID | Name | Type | Description |
|---|---|---|---|
0x4000 |
EnhancedCurrentHue Enhanced Hue |
uint16 | Current 16-bit Enhanced Hue value, 0~0xFFFF. 256 times the precision of standard Hue |
0x4002 |
ColorLoopActive Loop Active |
uint8 | 0 = inactive, 1 = active. Requires CL feature |
0x4003 |
ColorLoopDirection Loop Direction |
uint8 | 0 = Decrement, 1 = Increment |
0x4004 |
ColorLoopTime Loop Time |
uint16 | Time to complete one hue loop cycle, in seconds |
0x4005 |
ColorLoopStartEnhancedHue Loop Start Hue |
uint16 | Enhanced Hue value at the start of the Color Loop |
0x4006 |
ColorLoopStoredEnhancedHue Stored Loop Hue |
uint16 | Enhanced Hue value restored when Color Loop is deactivated |
Capabilities & Color Temperature Range
Describes the device's supported color control capabilities and the physical color temperature range. These attributes must be read during development to determine the available control modes.
| ID | Name | Type | Description |
|---|---|---|---|
0x400A |
ColorCapabilities Color Capabilities |
bitmap16 | Bitmap of supported color control capabilities (see Feature Map definition below) |
0x400B |
ColorTempPhysicalMinMireds Min CT |
uint16 | Minimum color temperature supported (Mireds), i.e. highest Kelvin. Range 1~65279 |
0x400C |
ColorTempPhysicalMaxMireds Max CT |
uint16 | Maximum color temperature supported (Mireds), i.e. lowest Kelvin. Range 1~65279 |
0x400D |
CoupleColorTempToLevelMinMireds CT-to-Level Min |
uint16 | Minimum Mireds value allowed when color-temperature-to-level coupling is enabled |
0x4010 |
StartUpColorTemperatureMireds Startup CT |
uint16 / null | Initial color temperature after power-on. null means restore the last color temperature before power-off. Read/Write |
ColorCapabilities Bitmap
A typical color temperature bulb: MinMireds = 153 (approx. 6536K cool white), MaxMireds = 500 (= 2000K warm yellow).
The two ends of the UI color temperature slider should use these values. If the target value in a MoveToColorTemperature command exceeds this range, the device will automatically clamp it.
Drift Compensation & Fixture Info
Describes the fixture's color drift compensation mechanism and the number of primaries. Most app development does not need these attributes.
| ID | Name | Type | Description |
|---|---|---|---|
0x0005 |
DriftCompensation Drift Compensation |
enum8 | Color drift compensation type used by the fixture |
0x0006 |
CompensationText Compensation Text |
string | Text description of the drift compensation mechanism |
0x0010 |
NumberOfPrimaries Number of Primaries |
uint8 / null | Number of independent color primaries (LED channels) in the fixture, maximum 6. null means unknown |
DriftCompensation Enum Values
Primary Coordinates (Primary 1~6)
A fixture can declare up to 6 primaries, each with CIE XY coordinates and an intensity value. These attributes describe the physical color gamut of the fixture's LEDs, typically set by firmware, and generally do not need to be read during app development.
Primary 1~6 Attribute List (click to expand)
| Group | X Coordinate ID | Y Coordinate ID | Intensity ID |
|---|---|---|---|
| Primary 1 | 0x0011 | 0x0012 | 0x0013 |
| Primary 2 | 0x0015 | 0x0016 | 0x0017 |
| Primary 3 | 0x0019 | 0x001A | 0x001B |
| Primary 4 | 0x0020 | 0x0021 | 0x0022 |
| Primary 5 | 0x0024 | 0x0025 | 0x0026 |
| Primary 6 | 0x0028 | 0x0029 | 0x002A |
All X / Y coordinates are uint16 type, range 0~0xFEFF; Intensity is uint8 / nullable type.
White Point & Color Points
Describes the fixture's white point and RGB color point coordinates for color calibration. These attributes are writable and typically used by advanced calibration tools; app development generally does not need them.
White Point & Color Points Attribute List (click to expand)
| ID | Name | Type | Description |
|---|---|---|---|
0x0030 | WhitePointX | uint16 | White point CIE x coordinate |
0x0031 | WhitePointY | uint16 | White point CIE y coordinate |
0x0032 | ColorPointRX | uint16 | Red color point CIE x coordinate |
0x0033 | ColorPointRY | uint16 | Red color point CIE y coordinate |
0x0034 | ColorPointRIntensity | uint8 / null | Red color point intensity |
0x0036 | ColorPointGX | uint16 | Green color point CIE x coordinate |
0x0037 | ColorPointGY | uint16 | Green color point CIE y coordinate |
0x0038 | ColorPointGIntensity | uint8 / null | Green color point intensity |
0x003A | ColorPointBX | uint16 | Blue color point CIE x coordinate |
0x003B | ColorPointBY | uint16 | Blue color point CIE y coordinate |
0x003C | ColorPointBIntensity | uint8 / null | Blue color point intensity |
Command Parameter Enum Quick Reference
The following enum types are reused across multiple command parameters.
DirectionEnum (Hue Transition Direction)
MoveModeEnum (Continuous Move Mode)
StepModeEnum (Step Direction)
MoveModeEnum values are 0, 1, 3 (no 2), and StepModeEnum values are 1, 3 (no 0 or 2).
This is a historical design inherited from ZCL (ZigBee Cluster Library). Sending an invalid value (e.g. 2) will cause the device to return an error.
ColorLoopActionEnum (Loop Action)
ColorLoopDirectionEnum (Loop Direction)
UpdateFlags Bitmap (ColorLoopSet Command Parameter)
Standard Example
Below is a typical attribute data example for a full-capability (HS + XY + CT + EHUE + CL) full-color light:
{
// --- Current Color State ---
"0x0000": 127, // CurrentHue = 127 (approx. 180°, near cyan)
"0x0001": 200, // CurrentSaturation = 200 (high saturation)
"0x0003": 24939, // CurrentX = 24939 (CIE x ≈ 0.3805)
"0x0004": 24701, // CurrentY = 24701 (CIE y ≈ 0.3769)
"0x0007": 370, // ColorTemperatureMireds = 370 (approx. 2703K warm white)
"0x0002": 0, // RemainingTime = 0 (no transition in progress)
// --- Color Mode ---
"0x0008": 2, // ColorMode = ColorTemperature (currently using CT control)
"0x4001": 2, // EnhancedColorMode = ColorTemperature
"0x000F": 0, // Options = 0 (ExecuteIfOff not enabled)
// --- Enhanced Hue & Color Loop ---
"0x4000": 0, // EnhancedCurrentHue = 0
"0x4002": 0, // ColorLoopActive = 0 (loop not active)
"0x4003": 0, // ColorLoopDirection = Decrement
"0x4004": 25, // ColorLoopTime = 25 seconds
"0x4005": 0, // ColorLoopStartEnhancedHue = 0
"0x4006": 0, // ColorLoopStoredEnhancedHue = 0
// --- Capabilities & CT Range ---
"0x400A": 31, // ColorCapabilities = 0x1F (all five capabilities supported)
"0x400B": 153, // ColorTempPhysicalMinMireds = 153 (approx. 6536K)
"0x400C": 500, // ColorTempPhysicalMaxMireds = 500 (approx. 2000K)
"0x400D": 153, // CoupleColorTempToLevelMinMireds = 153
"0x4010": 370 // StartUpColorTemperatureMireds = 370 (warm white on power-on)
}
When reading data from the device, Attribute IDs are hexadecimal strings used as keys. "0x0007" is ColorTemperatureMireds, "0x400A" is ColorCapabilities.
The bitmap value 31 = 0x1F = binary 11111, meaning all five capabilities are supported.
Common Scenarios
Scenario 1: Color Temperature Slider
- Read
ColorCapabilities (0x400A)and confirm Bit 4 (CT) is 1 - Read
ColorTempPhysicalMinMireds (0x400B)andColorTempPhysicalMaxMireds (0x400C)to determine the slider range - When the user drags the slider, convert Kelvin to Mireds:
mireds = 1000000 / kelvin - Send
MoveToColorTemperature (0x0A)with TransitionTime set to 5 (0.5-second transition) - Subscribe to
ColorTemperatureMireds (0x0007)to confirm the device has reached the target color temperature
Scenario 2: Color Wheel Picker (Hue/Saturation)
- Read
ColorCapabilities (0x400A)and confirm Bit 0 (HS) is 1 - User selects a point on the color wheel, obtaining angle and radius
- Angle to Hue:
hue = angle * 254 / 360 - Radius to Saturation:
saturation = radius * 254 / maxRadius - Send
MoveToHueAndSaturation (0x06)to set both values at once - Subscribe to
CurrentHue (0x0000)andCurrentSaturation (0x0001)to confirm the result
Scenario 3: Light Control Page Initialization
- Read
ColorCapabilities (0x400A)-- determines which control components to show in the UI (color wheel, CT slider, etc.) - Read
EnhancedColorMode (0x4001)-- determines the current color mode and highlights the corresponding UI tab - Read the corresponding attributes based on the mode: CT mode reads
ColorTemperatureMireds, HS mode readsCurrentHue+CurrentSaturation - If CT is supported, read
ColorTempPhysicalMinMireds/MaxMiredsto set the slider range - Subscribe to all relevant attribute changes to keep the UI in sync with device state
Scenario 4: Ambient / Party Mode (Color Loop)
- Read
ColorCapabilities (0x400A)and confirm Bit 2 (CL) is 1 - Send
ColorLoopSet (0x44): UpdateFlags =0x0F, Action =2(start from current color), Direction =1(increment), Time =30(30 seconds per cycle) - Read
ColorLoopActive (0x4002)to confirm the loop is active - To stop, send ColorLoopSet again with Action =
0(Deactivate)