ColorSpectrum Trait Schema
action.devices.traits.ColorSpectrum
- This trait belongs to any device
that is able to set a color spectrum. This applies to "full" color bulbs that take RGB color
ranges. Lights may have any combination of ColorSpectrum and
ColorTemperature; accent lights and LED strips may just have Spectrum,
whereas some reading bulbs just have Temperature. Basic bulbs, or dumb lights on smart plugs, have
neither.
Device STATES
State |
Definition |
color |
Object. Current color setting. Since a given light is in spectrum OR
temperature mode, this object includes the current color settings in the
relevant mode.
name String. If the color point (Spectrum or Temperature)
matches a preset name on the partner's color list, return the name.
spectrumRGB Integer. Spectrum value in RGB (hex value as
an integer).
|
Device COMMANDS
Command |
Parameters/Definition |
action.devices.commands.ColorAbsolute |
color Object. Required. Will include RGB or Temperature and
optionally, a name.
name String. Color name (in English) as provided in the
user's command. Not always available (for relative commands).
spectrumRGB Integer. Spectrum value in RGB (hex value as
an integer).
|
Sample EXECUTE Request
Set my light to red.
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"inputs": [{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [{
"devices": [{
"id": "123",
"customData": {
"fooValue": 74,
"barValue": true,
"bazValue": "sheepdip"
}
}],
"execution": [{
"command": "action.devices.commands.ColorAbsolute",
"params": {
"color": {
"name": "red",
"spectrumRGB": 16711680
}
}
}]
}]
}
}]
}
Other example invocations include the following:
- Set my lights to green.
- Change my desk lamp to red.