I have a device defined:
Color OfficeLEDColor "Office Accent" (gOffice, gPersist) ["Switchable"]
and am using both Google Assistant and Echo via the Hue emulation.
Google supports colors – “Alexa, set Office Accent color blue”, bit Alexa only seems to support on/off/dim commands. In the Alexa app, it states “Color Capabilities: none”.
I’ve tried both “Switchable” and “Lighting” as the tag, and in either case I seem to get the same result.
The device is a home-built ESP8266 controlling addressable LEDs, the following rule drives it:
rule "Office Color change" when Item OfficeLEDColor received update then var hsbValue = OfficeLEDColor.state as HSBType var redValue = (hsbValue.red.intValue * 255) / 100 var greenValue = (hsbValue.green.intValue * 255) / 100 var blueValue = (hsbValue.blue.intValue * 255) / 100 var String formattedString = String::format("color:%03d,%03d,%03d", redValue, greenValue, blueValue) logInfo("<<< Setting OfficeLEDColor Color to >>>", formattedString); publish("mqtt87", "/ledlights/office", formattedString) end
I’d really like to get this working with both platforms, as we have a mixture of devices in different rooms.