You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 9, 2024. It is now read-only.
Any idea how to format the color map data type? I've tried the following:
result = await light.command("main", "colorControl", "setColor", ["hue: 50", "saturation: 60"]) assert result == True
result = await light.command("main", "colorControl", "setColor", ["[hue: 50, saturation: 60]"]) assert result == True
and
result = await light.command("main", "colorControl", "setColor", ["hue: 50, saturation: 60"]) assert result == True
All of which have given the error: pysmartthings.errors.APIResponseError: Unprocessable Entity (422): {"requestId": "C8731E93-C14F-4B9C-A3F3-33567D788575", "error": {"code": "ConstraintViolationError", "message": "The request is malformed.", "details": [{"code": "SizeError", "target": "[0].arguments", "message": "[0].arguments must have a size between 1 and 1.", "details": []}, {"code": "UnprocessableEntityError", "target": "[0].arguments.[0]", "message": "invalid COLOR_MAP type", "details": []}]}}
The text was updated successfully, but these errors were encountered:
For anyone else having this issue, here's the answer: Color_Map is a dictionary, as such it need to be passed through like light.command("main", "colorControl", "setColor", [{"key": "value"}])
where key = the thing you want to manipulate and value = what you want to set the key to.
Here is a list of all the Key/Value pairs (which is also left out of the official documentation, thanks Samsung!)
{"hue": number 1-100}
{"saturation": number 1-100}
{"hex": "#RRGGBB"}
{"level": number} (no idea what this does)
{"switch":"on/off"} (no idea what this does and it's not what you think it does)
(Must ALWAYS include the Hue and Saturation keys)
Any idea how to format the color map data type? I've tried the following:
result = await light.command("main", "colorControl", "setColor", ["hue: 50", "saturation: 60"]) assert result == True
result = await light.command("main", "colorControl", "setColor", ["[hue: 50, saturation: 60]"]) assert result == True
and
result = await light.command("main", "colorControl", "setColor", ["hue: 50, saturation: 60"]) assert result == True
All of which have given the error:
pysmartthings.errors.APIResponseError: Unprocessable Entity (422): {"requestId": "C8731E93-C14F-4B9C-A3F3-33567D788575", "error": {"code": "ConstraintViolationError", "message": "The request is malformed.", "details": [{"code": "SizeError", "target": "[0].arguments", "message": "[0].arguments must have a size between 1 and 1.", "details": []}, {"code": "UnprocessableEntityError", "target": "[0].arguments.[0]", "message": "invalid COLOR_MAP type", "details": []}]}}
The text was updated successfully, but these errors were encountered: