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).

Color Temperature Unit

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.

Bit 0
HS(Hue/Saturation) Supports Hue/Saturation control. MoveToHue, MoveToSaturation, and related commands become available
Bit 1
EHUE(Enhanced Hue) Supports 16-bit high-precision hue control. EnhancedMoveToHue and related commands become available
Bit 2
CL(Color Loop) Supports automatic color cycling. The ColorLoopSet command becomes available
Bit 3
XY Supports CIE 1931 XY chromaticity control. MoveToColor, MoveColor, and related commands become available
Bit 4
CT(Color Temperature) Supports color temperature control. MoveToColorTemperature and related commands become available
Developer Tip

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.

ParameterTypeDescription
Hueuint8Target hue value, 0~254
DirectionDirectionEnumTransition direction: ShortestDistance / LongestDistance / Up / Down
TransitionTimeuint16Transition time in 1/10 seconds
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
MoveModeMoveModeEnumMove mode: Stop / Up / Down
Rateuint8Hue steps per second
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
StepModeStepModeEnumStep direction: Up / Down
StepSizeuint8Hue change per step
TransitionTimeuint8Transition time, in 1/10 seconds
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
Saturationuint8Target saturation, 0~254
TransitionTimeuint16Transition time, in 1/10 seconds
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
Hueuint8Target hue value, 0~254
Saturationuint8Target saturation, 0~254
TransitionTimeuint16Transition time, in 1/10 seconds
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
ColorXuint16CIE x coordinate, 0~0xFEFF (actual value = ColorX / 65536)
ColorYuint16CIE y coordinate, 0~0xFEFF (actual value = ColorY / 65536)
TransitionTimeuint16Transition time, in 1/10 seconds
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
RateXint16X coordinate change per second (signed)
RateYint16Y coordinate change per second (signed)
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options override

StepColor (0x09)

Increases/decreases both X and Y coordinates by a step value.

ParameterTypeDescription
StepXint16X coordinate step amount (signed)
StepYint16Y coordinate step amount (signed)
TransitionTimeuint16Transition time, in 1/10 seconds
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
ColorTemperatureMiredsuint16Target color temperature (Mireds)
TransitionTimeuint16Transition time, in 1/10 seconds
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
MoveModeMoveModeEnumMove mode: Stop / Up / Down
Rateuint16Mireds change per second
ColorTemperatureMinimumMiredsuint16Minimum bound for movement
ColorTemperatureMaximumMiredsuint16Maximum bound for movement
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options override

StepColorTemperature (0x4C)

Increases or decreases the color temperature by a specified step value, with configurable upper and lower bounds.

ParameterTypeDescription
StepModeStepModeEnumStep direction: Up / Down
StepSizeuint16Mireds change per step
TransitionTimeuint16Transition time, in 1/10 seconds
ColorTemperatureMinimumMiredsuint16Minimum bound for stepping
ColorTemperatureMaximumMiredsuint16Maximum bound for stepping
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
EnhancedHueuint16Target Enhanced Hue value, 0~0xFFFF
DirectionDirectionEnumTransition direction
TransitionTimeuint16Transition time, in 1/10 seconds
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
EnhancedHueuint16Target Enhanced Hue value
Saturationuint8Target saturation, 0~254
TransitionTimeuint16Transition time, in 1/10 seconds
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

ParameterTypeDescription
UpdateFlagsUpdateFlagsBitmapSpecifies which fields to update (see bitmap below)
ActionColorLoopActionEnumLoop action: Deactivate / Start from start hue / Start from current hue
DirectionColorLoopDirectionEnumLoop direction: Decrement / Increment
Timeuint16Time to complete one loop cycle (seconds)
StartHueuint16Starting Enhanced Hue value for the loop
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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).

ParameterTypeDescription
OptionsMaskbitmap8Options mask
OptionsOverridebitmap8Options 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.

IDNameTypeDescription
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
Hue Value Mapping Note

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.

IDNameTypeDescription
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

0
CurrentHueAndCurrentSaturation Hue/Saturation mode
1
CurrentXAndCurrentY CIE XY chromaticity mode
2
ColorTemperatureMireds Color Temperature mode

EnhancedColorMode Enum Values

0
CurrentHueAndCurrentSaturation Hue/Saturation mode
1
CurrentXAndCurrentY CIE XY chromaticity mode
2
ColorTemperatureMireds Color Temperature mode
3
EnhancedCurrentHueAndCurrentSaturation Enhanced Hue + Saturation mode (16-bit high-precision)
ColorMode vs EnhancedColorMode

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.

IDNameTypeDescription
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.

IDNameTypeDescription
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

Bit 0
HueSaturation(0x01) Supports Hue/Saturation control
Bit 1
EnhancedHue(0x02) Supports 16-bit Enhanced Hue
Bit 2
ColorLoop(0x04) Supports automatic color cycling
Bit 3
XY(0x08) Supports CIE XY chromaticity control
Bit 4
ColorTemperature(0x10) Supports Color Temperature control
Color Temperature Range Example

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.

IDNameTypeDescription
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

0
None No drift compensation
1
OtherOrUnknown Other or unknown compensation
2
TemperatureMonitoring Temperature monitoring compensation
3
OpticalLuminanceMonitoringAndFeedback Optical luminance monitoring and feedback
4
OpticalColorMonitoringAndFeedback Optical color monitoring and feedback

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)
GroupX Coordinate IDY Coordinate IDIntensity ID
Primary 10x00110x00120x0013
Primary 20x00150x00160x0017
Primary 30x00190x001A0x001B
Primary 40x00200x00210x0022
Primary 50x00240x00250x0026
Primary 60x00280x00290x002A

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)
IDNameTypeDescription
0x0030WhitePointXuint16White point CIE x coordinate
0x0031WhitePointYuint16White point CIE y coordinate
0x0032ColorPointRXuint16Red color point CIE x coordinate
0x0033ColorPointRYuint16Red color point CIE y coordinate
0x0034ColorPointRIntensityuint8 / nullRed color point intensity
0x0036ColorPointGXuint16Green color point CIE x coordinate
0x0037ColorPointGYuint16Green color point CIE y coordinate
0x0038ColorPointGIntensityuint8 / nullGreen color point intensity
0x003AColorPointBXuint16Blue color point CIE x coordinate
0x003BColorPointBYuint16Blue color point CIE y coordinate
0x003CColorPointBIntensityuint8 / nullBlue color point intensity

Command Parameter Enum Quick Reference

The following enum types are reused across multiple command parameters.

DirectionEnum (Hue Transition Direction)

0
Shortest Shortest path (shorter arc on the color wheel)
1
Longest Longest path (longer arc on the color wheel)
2
Up Increasing value direction
3
Down Decreasing value direction

MoveModeEnum (Continuous Move Mode)

0
Stop Stop moving
1
Up Up (increasing value)
3
Down Down (decreasing value)

StepModeEnum (Step Direction)

1
Up Step increase
3
Down Step decrease
Note the Value Gaps in MoveMode / StepMode

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)

0
Deactivate Deactivate Color Loop
1
ActivateFromColorLoopStartEnhancedHue Start loop from ColorLoopStartEnhancedHue
2
ActivateFromEnhancedCurrentHue Start loop from current Enhanced Hue

ColorLoopDirectionEnum (Loop Direction)

0
Decrement Loop in decreasing hue direction
1
Increment Loop in increasing hue direction

UpdateFlags Bitmap (ColorLoopSet Command Parameter)

Bit 0
UpdateAction(0x01) Update the Action field
Bit 1
UpdateDirection(0x02) Update the Direction field
Bit 2
UpdateTime(0x04) Update the Time field
Bit 3
UpdateStartHue(0x08) Update the StartHue field

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)
}
Developer Tip

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

  1. Read ColorCapabilities (0x400A) and confirm Bit 4 (CT) is 1
  2. Read ColorTempPhysicalMinMireds (0x400B) and ColorTempPhysicalMaxMireds (0x400C) to determine the slider range
  3. When the user drags the slider, convert Kelvin to Mireds: mireds = 1000000 / kelvin
  4. Send MoveToColorTemperature (0x0A) with TransitionTime set to 5 (0.5-second transition)
  5. Subscribe to ColorTemperatureMireds (0x0007) to confirm the device has reached the target color temperature

Scenario 2: Color Wheel Picker (Hue/Saturation)

  1. Read ColorCapabilities (0x400A) and confirm Bit 0 (HS) is 1
  2. User selects a point on the color wheel, obtaining angle and radius
  3. Angle to Hue: hue = angle * 254 / 360
  4. Radius to Saturation: saturation = radius * 254 / maxRadius
  5. Send MoveToHueAndSaturation (0x06) to set both values at once
  6. Subscribe to CurrentHue (0x0000) and CurrentSaturation (0x0001) to confirm the result

Scenario 3: Light Control Page Initialization

  1. Read ColorCapabilities (0x400A) -- determines which control components to show in the UI (color wheel, CT slider, etc.)
  2. Read EnhancedColorMode (0x4001) -- determines the current color mode and highlights the corresponding UI tab
  3. Read the corresponding attributes based on the mode: CT mode reads ColorTemperatureMireds, HS mode reads CurrentHue + CurrentSaturation
  4. If CT is supported, read ColorTempPhysicalMinMireds / MaxMireds to set the slider range
  5. Subscribe to all relevant attribute changes to keep the UI in sync with device state

Scenario 4: Ambient / Party Mode (Color Loop)

  1. Read ColorCapabilities (0x400A) and confirm Bit 2 (CL) is 1
  2. Send ColorLoopSet (0x44): UpdateFlags = 0x0F, Action = 2 (start from current color), Direction = 1 (increment), Time = 30 (30 seconds per cycle)
  3. Read ColorLoopActive (0x4002) to confirm the loop is active
  4. To stop, send ColorLoopSet again with Action = 0 (Deactivate)