Skip to content

Commit c25f08f

Browse files
authored
Merge pull request #927 from nel-stefan/master
Added quotes around strings in json response for huemulator
2 parents d6ad9d2 + 9a35e47 commit c25f08f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.bwssystems.HABridge</groupId>
77
<artifactId>ha-bridge</artifactId>
8-
<version>5.2.1</version>
8+
<version>5.2.2</version>
99
<packaging>jar</packaging>
1010

1111
<name>HA Bridge</name>

src/main/java/com/bwssystems/HABridge/hue/HueMulator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,8 @@ private String formatSuccessHueResponse(StateChangeBody stateChanges, String bod
570570
if (body.contains("\"effect\"")) {
571571
if (notFirstChange)
572572
responseString = responseString + ",";
573-
responseString = responseString + "{\"success\":{\"/lights/" + lightId + "/state/effect\":"
574-
+ stateChanges.getEffect() + "}}";
573+
responseString = responseString + "{\"success\":{\"/lights/" + lightId + "/state/effect\":\""
574+
+ stateChanges.getEffect() + "\"}}";
575575
if (deviceState != null)
576576
deviceState.setEffect(stateChanges.getEffect());
577577
notFirstChange = true;
@@ -590,8 +590,8 @@ private String formatSuccessHueResponse(StateChangeBody stateChanges, String bod
590590
if (body.contains("\"alert\"")) {
591591
if (notFirstChange)
592592
responseString = responseString + ",";
593-
responseString = responseString + "{\"success\":{\"/lights/" + lightId + "/state/alert\":"
594-
+ stateChanges.getAlert() + "}}";
593+
responseString = responseString + "{\"success\":{\"/lights/" + lightId + "/state/alert\":\""
594+
+ stateChanges.getAlert() + "\"}}";
595595
if (deviceState != null)
596596
deviceState.setAlert(stateChanges.getAlert());
597597
notFirstChange = true;

0 commit comments

Comments
 (0)