Can someone shed some light on what exactly is expected with regards to the Capability and MakerAPI around the output of supportedThermostatModes (and all the other supportedXYZ attributes) when it is marked as being a JSON Object?
Correctly formatted JSON would be ["heat", "cool", "auto", "off"]
attribute "supportedThermostatModes", "JSON_OBJECT"
But the below code actually ends up sending [heat, cool, auto, off]
sendEvent(name: "supportedThermostatModes", value: ["heat", "cool", "auto", "off"])
And when I check Thermostat Controller, it expects the attributes to be sent like this too.. [heat, cool, auto, off]
... which I would consider to be incorrect and not valid JSON.
So what's the correct and valid output ?? (other than whatever works)
This code will produce valid JSON from a List
groovy.json.JsonOutput.toJson(["heat", "cool", "auto", "off"])