tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
December 23, 2016, 8:52pm
11
Something like that might work, but really…
Study (read several times) the Capability colorControl section: http://docs.smartthings.com/en/latest/capabilities-reference.html#color-control
Then realize … it is really a bit of an ambiguous mess… (not your fault… it just evolved inconsistently, IMHO. There have been a few discussions on this…
Tagging @Jim ; but encouraging color light developers to chime in.
Capability “Color Control” is defined in the Developer Documentation: One simple home system. A world of possibilities. | SmartThings
[image]
###This definition seems effed-up to me … because:
Attributes hue & saturation and Commands setHue(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”.
Whenev…
For a “sync” SmartApp I think you can avoid using the setColor()
method, and, instead use the Hue and Saturation Attributes and Commands directly:
1 Like