Merge pull request #927 from nel-stefan/master

Added quotes around strings in json response for huemulator
This commit is contained in:
BWS Systems
2018-08-07 13:42:23 -05:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
<groupId>com.bwssystems.HABridge</groupId>
<artifactId>ha-bridge</artifactId>
<version>5.2.1</version>
<version>5.2.2</version>
<packaging>jar</packaging>
<name>HA Bridge</name>

View File

@@ -570,8 +570,8 @@ public class HueMulator {
if (body.contains("\"effect\"")) {
if (notFirstChange)
responseString = responseString + ",";
responseString = responseString + "{\"success\":{\"/lights/" + lightId + "/state/effect\":"
+ stateChanges.getEffect() + "}}";
responseString = responseString + "{\"success\":{\"/lights/" + lightId + "/state/effect\":\""
+ stateChanges.getEffect() + "\"}}";
if (deviceState != null)
deviceState.setEffect(stateChanges.getEffect());
notFirstChange = true;
@@ -590,8 +590,8 @@ public class HueMulator {
if (body.contains("\"alert\"")) {
if (notFirstChange)
responseString = responseString + ",";
responseString = responseString + "{\"success\":{\"/lights/" + lightId + "/state/alert\":"
+ stateChanges.getAlert() + "}}";
responseString = responseString + "{\"success\":{\"/lights/" + lightId + "/state/alert\":\""
+ stateChanges.getAlert() + "\"}}";
if (deviceState != null)
deviceState.setAlert(stateChanges.getAlert());
notFirstChange = true;