Tagging @Jim; but encouraging color light developers to chime in.
Capability “Color Control” is defined in the Developer Documentation: http://docs.smartthings.com/en/latest/capabilities-reference.html#color-control
###This definition seems effed-up to me … because:
- Attributes
hue
&saturation
and CommandssetHue(number)
&setSaturation(number)
are completely redundant with the “hue:
” and “saturation:
” keys available to the “color[]
” Map.
Furthermore, map keys level
and switch
are obviously and painfully redundant with the distinct Capabilities (Attributes and Commands) of Switch Level
and Switch
.
This type of redundancy causes non-trivial risk of inconsistencies in DTH implementation and usage by SmartApps. WTF?
.
- The “
color[]
” Map is described as “Color Options”.
Whenever elements of an Attribute are optional, it causes extra work for the DTH developer, since they have to determine what “options” (grrrr!!!) to support and not-support.
Capabilities should not have “optional” claims… otherwise, how the heck is a SmartApp supposed to ensure the Device responds appropriately?
###I’ve looked at several DTHs from the SmartThings Community Public GitHub…
A) LIFX accepts these keys for Command setColor()
: hue
, saturation
and colorTemperature
(WTF? That is not one of the “options” for color[]
map:
B) The same DTH returns a String (not a Map) for Attribute color
:
Actually… Observation (B) seems typical. Looking at the current values of one of my Hue Bulbs, for example, Attribute color
is obviously being set to a String, not a Map.
I don’t have have an Osram Gardenspot, but its code also clearly shows it setting the color
Attribute to a single hex value, not a Map:
And an example of the consequences of this confusion:
##Arrrgh!
@jim, @slagle, @jody.albritton (et al.):
- Is the Documentation for Capability “Color Control” incorrect?
- or, @tyler, are the various color bulb DTHs that I’ve browsed non-compliant? If so, then (a) do you have an example of a fully compliant DTH, and (b) is anything being done to bring other published color lights into compliance?
Thanks!