Colour Control in rules API

G’day all,

just hoping one of you good people could show me the correct JSON command to set the colour temperature of a bulb in the rules API. I’ve tried a few different things and nothing works. I can find an example of setting the hue and saturation but not the temperature. I’m kinda stuck at this point and I don’t even know if I’m heading down the right track.

Cheers, Geoff

"else": [
                                {
                                    "command": {
                                        "devices": [
                                            "0e9ada82-04f6-4de2-ba49-9052f2b0ca2c",
                                            "60aa85fa-95ac-4193-b239-68dadfd8dd01"
                                        ],
                                        "commands": [
                                            {
                                                "component": "main",
                                                "capability": "switch",
                                                "command": "on"
                                            },
                                            {
                                                "component": "main",
                                                "capability": "colorTemperature",
                                                "command": "setColorTemperature",
                                                "arguments": [
                                                    {
                                                        ?????????
                                                            }
                                                        }
                                                    }
                                                ]
                                            }

There is just one argument to setColorTemperature so:

                        "arguments": [
                            {
                                "integer": 2000
                            }
                        ]
1 Like

Such an easy fix after I spent the last 4 hours scouring the Web and the documentation for an example :person_facepalming:. I even tried something similar but it wasn’t correct enough

Cheers mate