First of all, thanks for this great binding. It was very easy to setup. There is only 1 thing I haven’t figured out yet:
I’m trying to adjust the color through a rule. I use this code in my rule:
Milight_ID0x2_G1_Cmd.sendCommand("100,356,100")
Milight_ID0x2_G1_SndCmd.sendCommand(ON)
My items:
Switch Milight_ID0x2_G1_State "Light On/Off" {channel="espmilighthub:rgb_cct:Auto001:0x21:level"}
Dimmer Milight_ID0x2_G1_Level "0x005" {channel="espmilighthub:rgb_cct:Auto001:0x21:level"}
Dimmer Milight_ID0x2_G1_CTemp "White Color Temp" {channel="espmilighthub:rgb_cct:Auto001:0x21:colourtemperature"}
Color Milight_ID0x2_G1_Hue "Color" ["Lighting"] {channel="espmilighthub:rgb_cct:Auto001:0x21:colour"}
Number Milight_ID0x2_G1_Mode "Discomode" {channel="espmilighthub:rgb_cct:Auto001:0x21:discomode"}
String Milight_ID0x2_G1_Cmd "Command to Send" {channel="espmilighthub:rgb_cct:Auto001:0x21:bulbcommand"}
Switch Milight_ID0x2_G1_SndCmd "Send Command" {channel="espmilighthub:rgb_cct:Auto001:0x21:sendbulbcommand"}
When I set a color through the sitemap I see this in the log:
milight/commands/0x2/rgb_cct/1 {"state":"ON","level":100,"hue":2,"saturation":95}
milight/states/0x2/rgb_cct/1 {"state":"ON","level":100,"hue":1,"saturation":95,"bulb_mode":"color"}
When my rules gets executed:
milight/commands/0x2/rgb_cct/1 {"command":"100,100,356"}
What am I doing wrong?
EDIT: OK, after a good night sleep and reading through the topic from the previous version of this binding, I think the command should be more like this:
`Milight_ID0x2_G1_Cmd.sendCommand('{"state":"ON","level":100,"hue":1,"saturation":5,"bulb_mode":"color"}')`
Logs:
milight/commands/0x2/rgb_cct/1 {"command":"{"state":"ON","level":100,"hue":1,"saturation":5,"bulb_mode":"color"}"}
milight/commands/0x2/rgb_cct/1 {"command":"{"state":"ON","level":100,"hue":1,"saturation":5,"bulb_mode":"color"}"}
How do I send only the state to an item instead of a command with the state??