LightEffectsTrait.Color

class LightEffectsTrait.Color : ClusterStruct


Color of the light for the duration of the effect.

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

Color(
    name: String,
    temperature: UInt,
    spectrumHsv: LightEffectsTrait.SpectrumHsv,
    spectrumRgb: ULong
)

Creates the Color class.

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

String

Name of the requested color.

LightEffectsTrait.SpectrumHsv

Color definition using the HSV model.

ULong

Color definition using the RGB model.

UInt

Color temperature in degrees of Kelvin.

Public constructors

Color

Color(
    name: String = "",
    temperature: UInt,
    spectrumHsv: LightEffectsTrait.SpectrumHsv = SpectrumHsv(),
    spectrumRgb: ULong
)

Creates the Color class.

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

name

val nameString

Name of the requested color.

spectrumHsv

val spectrumHsvLightEffectsTrait.SpectrumHsv

Color definition using the HSV model. Cannot be used if either temperature or spectrumRGBare set.

spectrumRgb

val spectrumRgbULong

Color definition using the RGB model. Cannot be used if either spectrumHSV or temperature are set.

temperature

val temperatureUInt

Color temperature in degrees of Kelvin. Cannot be used if either spectrumHSV or spectrumRGBare set.