ColorControl

interface ColorControl : ColorControlTrait.Attributes, MatterTrait, Updatable, ColorControlCommands


API for the ColorControl trait. This trait provides an interface for changing the color of a light.

Summary

Nested types

Descriptor enum for this trait's attributes.

Descriptor enum for this trait's commands.

Public functions

Boolean
Boolean

Public properties

open TraitFactory<ColorControl>

Inherited functions

From com.google.home.matter.standard.ColorControlCommands
suspend Unit
colorLoopSet(
    updateFlags: ColorControlTrait.ColorLoopUpdateFlags,
    action: ColorControlTrait.ColorLoopAction,
    direction: ColorControlTrait.ColorLoopDirection,
    time: UShort,
    startHue: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Cycles the device through its range of hues.

suspend Unit
enhancedMoveHue(
    moveMode: ColorControlTrait.HueMoveMode,
    rate: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Change a device's enhanced hue based on a rate of movement.

suspend Unit
enhancedMoveToHue(
    enhancedHue: UShort,
    direction: ColorControlTrait.HueDirection,
    transitionTime: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device from its current hue to the provided enhanced hue.

suspend Unit
enhancedMoveToHueAndSaturation(
    enhancedHue: UShort,
    saturation: UByte,
    transitionTime: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device from its current enhanced hue and saturation to the provided enhanced hue and saturation.

suspend Unit
enhancedStepHue(
    stepMode: ColorControlTrait.HueStepMode,
    stepSize: UShort,
    transitionTime: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device's enhanced hue a specific amount over a period of time.

suspend Unit
moveColor(
    rateX: Short,
    rateY: Short,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device from its current color in a continuous fashion according to the rates specified.

suspend Unit
moveColorTemperature(
    moveMode: ColorControlTrait.HueMoveMode,
    rate: UShort,
    colorTemperatureMinimumMireds: UShort,
    colorTemperatureMaximumMireds: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Change a device's color temperature based on a rate of movement.

suspend Unit
moveHue(
    moveMode: ColorControlTrait.HueMoveMode,
    rate: UByte,
    optionsMask: UByte,
    optionsOverride: UByte
)

Change a device's hue based on a rate of movement.

suspend Unit
moveSaturation(
    moveMode: ColorControlTrait.SaturationMoveMode,
    rate: UByte,
    optionsMask: UByte,
    optionsOverride: UByte
)

Change a device's saturation based on a rate of movement.

suspend Unit
moveToColor(
    colorX: UShort,
    colorY: UShort,
    transitionTime: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device from its current color to the color given in the colorX and colorY parameters.

suspend Unit
moveToColorTemperature(
    colorTemperatureMireds: UShort,
    transitionTime: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device from its current color to a new color, using the scaled inverse of the color temperature, in mireds.

suspend Unit
moveToHue(
    hue: UByte,
    direction: ColorControlTrait.HueDirection,
    transitionTime: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device from its current hue to the provided hue.

suspend Unit
moveToHueAndSaturation(
    hue: UByte,
    saturation: UByte,
    transitionTime: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device from its current hue and saturation to the provided hue and saturation.

suspend Unit
moveToSaturation(
    saturation: UByte,
    transitionTime: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device from its current saturation to the provided saturation.

suspend Unit
stepColor(
    stepX: Short,
    stepY: Short,
    transitionTime: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device from its current color by the specified color step.

suspend Unit
stepColorTemperature(
    stepMode: ColorControlTrait.HueStepMode,
    stepSize: UShort,
    transitionTime: UShort,
    colorTemperatureMinimumMireds: UShort,
    colorTemperatureMaximumMireds: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Change a device's color temperature a specific amount over a period of time.

suspend Unit
stepHue(
    stepMode: ColorControlTrait.HueStepMode,
    stepSize: UByte,
    transitionTime: UByte,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device's hue a specific amount over a period of time.

suspend Unit
stepSaturation(
    stepMode: ColorControlTrait.SaturationStepMode,
    stepSize: UByte,
    transitionTime: UByte,
    optionsMask: UByte,
    optionsOverride: UByte
)

Move a device's saturation a specific amount over a period of time.

suspend Unit
stopMoveStep(optionsMask: UByte, optionsOverride: UByte)

Stop a MoveTo, Move, or Step command that is currently in process.

From com.google.home.TraitStateInvalidation
suspend Unit
From com.google.home.Updatable
suspend ColorControl
update(optimisticReturn: (ColorControl) -> Unit, init: ColorControlTrait.MutableAttributes.() -> Unit)

Creates a mutable copy of an object and calls the given function to mutate it, then saves it and returns a new immutable copy with the updated state.

Inherited properties

From com.google.home.matter.standard.ColorControlTrait.Attributes
List<UInt>

A list of client-generated commands which are supported by this cluster server instance.

List<UInt>

A list of the attribute IDs of the attributes supported by the cluster instance.

UShort

The revision of the server cluster specification supported by the cluster instance.

UShort?

The color capabilities that the device supports.

UByte?

The current active status of the color loop.

UByte?

The current direction of the color loop.

UShort?

The value of the enhancedCurrentHue attribute from which to start the color loop.

UShort?

The value of the enhancedCurrentHue attribute before the color loop was started.

UShort?

The number of seconds it takes to perform a full color loop.

UByte?

The attributes that are currently determining the color of the device.

UByte?

A representation of the relative intensity of the blue color point as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the color point with the highest relative intensity contains the value 0xfe.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space, of the current blue color point of the device.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space, of the current blue color point of the device.

UByte?

A representation of the relative intensity of the green color point as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the color point with the highest relative intensity contains the value 0xfe.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space, of the current green color point of the device.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space, of the current green color point of the device.

UByte?

A representation of the relative intensity of the red color point as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the color point with the highest relative intensity contains the value 0xfe.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space, of the current red color point of the device.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space, of the current red color point of the device.

UShort?

The maximum mired value supported by the device.

UShort?

The minimum mired value supported by the device.

UShort?

A scaled inverse of the current value of the color temperature, in mireds.

String?

A textual indication of what mechanism, if any, is in use to compensate for color or intensity drift over time.

UShort?

Specifies a lower bound on the value of the colorTemperatureMireds attribute for the purposes of coupling the colorTemperatureMireds attribute to the currentLevel attribute when the coupleColorTempToLevel bit of the options attribute of the LevelControl cluster is equal to 1.

UByte?

The current hue value of the light.

UByte?

The current saturation value of the light.

UShort?

The current value of the normalized chromaticity value x, as defined in the CIE xyY Color Space.

UShort?

The current value of the normalized chromaticity value y, as defined in the CIE xyY Color Space.

UByte?

The mechanism that is in use for compensation for color/intensity drift over time.

UByte?

The attributes that are currently determining the color of the device.

UShort?

Represents non-equidistant steps along the CIE 1931 color triangle.

ColorControlTrait.Feature

Whether the server supports zero or more optional cluster features.

List<UInt>

A list of server-generated commands (server to client) which are supported by this cluster server instance.

UByte?

The number of color primaries implemented on the device.

UByte?

A bitmap that determines the default behavior of some cluster commands.

UByte?

A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space.

UByte?

A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space.

UByte?

A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space.

UByte?

A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space.

UByte?

A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space.

UByte?

A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space.

UShort?

The time remaining (in 0.1 seconds) until the current command is complete.

UShort?

The desired startup color temperature value when a device is supplied with power.

UShort?

The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space, of the current white point of the device.

UShort?

The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space, of the current white point of the device.

From com.google.home.Trait

Public functions

supports

fun supports(attribute: ColorControl.Attribute): Boolean

supports

fun supports(command: ColorControl.Command): Boolean

Public properties

factory

open val factoryTraitFactory<ColorControl>