Fixed bug where device state object was dropped from hue api device

response object. This caused devices to appear offline and invalid
response interpretation by the echo.

Fixes #93
This commit is contained in:
Admin
2016-04-28 12:12:49 -05:00
parent aaaebd0c05
commit f238e05533
4 changed files with 24 additions and 3 deletions

View File

@@ -381,6 +381,7 @@ public class HueMulator implements HueErrorStringSet {
responseString = "[{\"error\":{\"type\": 3, \"address\": \"/lights/" + lightId + "\",\"description\": \"Could not find device\", \"resource\": \"/lights/" + lightId + "\"}}]";
return responseString;
}
state.fillIn();
theHeaders = new Gson().fromJson(device.getHeaders(), NameValue[].class);
responseString = this.formatSuccessHueResponse(state, request.body(), lightId);