ColorControlTrait.MoveToColorCommand.Request

class ColorControlTrait.MoveToColorCommand.Request : ClusterStruct


The request payload for the MoveToColor command.

Summary

Nested types

Descriptor enum for this command's request fields.

Public constructors

Request(
    colorX: UShort,
    colorY: UShort,
    transitionTime: UShort,
    optionsMask: ColorControlTrait.OptionsBitmap,
    optionsOverride: ColorControlTrait.OptionsBitmap
)

Creates a request payload for the MoveToColor command.

Public functions

open StructDescriptor

Returns the descriptor for the struct.

open Any?

Returns the value of the field for the given tag ID.

Public properties

UShort

The normalized chromaticity value x, as defined in the CIE xyY Color Space, to move the device's color to.

UShort

The normalized chromaticity value y, as defined in the CIE xyY Color Space, to move the device's color to.

ColorControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

ColorControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

UShort

The time (in 0.1 seconds) taken to move the device to the new color.

Public constructors

Request

Request(
    colorX: UShort,
    colorY: UShort,
    transitionTime: UShort,
    optionsMask: ColorControlTrait.OptionsBitmap = OptionsBitmap(),
    optionsOverride: ColorControlTrait.OptionsBitmap = OptionsBitmap()
)

Creates a request payload for the MoveToColor command.

Public functions

getDescriptor

@HomeExperimentalApi
open fun getDescriptor(): StructDescriptor

Returns the descriptor for the struct.

getFieldValueById

@HomeExperimentalApi
open fun getFieldValueById(tagId: UInt): Any?

Returns the value of the field for the given tag ID.

Public properties

colorX

val colorXUShort

The normalized chromaticity value x, as defined in the CIE xyY Color Space, to move the device's color to.

colorY

val colorYUShort

The normalized chromaticity value y, as defined in the CIE xyY Color Space, to move the device's color to.

optionsMask

val optionsMaskColorControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride

val optionsOverrideColorControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

transitionTime

val transitionTimeUShort

The time (in 0.1 seconds) taken to move the device to the new color.