0

I'm sending report state for my sample smart light. I'm using python as my server language. I'm can successfully authenticate my user with google. My smart light has the following traits ColorSpectrum (HSV), brightness, on/off. But when I send the report I get an error 400 which is bad request due to invalid syntax. below is my json which I am sending to homegraph server:

{"requestId": "c785ac58-dc96-4bd7-b475-2833a1775f70", "agentUserId": "ak8728", "payload": {"devices": {"states": {"ABC_90C6F4": {"on": true, "online": true, "spectrumHSV": {"hue": 120, "saturation": 1, "value": 1}, "brightness": 100}}}}}

which results in error 400.

But when I try to report state with the json below it's working fine:

{"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "agentUserId": "b9a0d641-712e-4e28-b1cc-1d97736a1c43", "payload": {"devices": {"states": {"Mansaa_181960": {"on": true, "online": true, "brightness": 100}}}}}

it will result in 200 success.

The report state does not work with spectrum HSV, I want to report the hsv values as well , what is the correct way to do so? Am I missing anything here?

sky9971
  • 3
  • 7

1 Answers1

0

You should update to use the ColorSetting trait, which supports the Report State feature for HSV colors.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35