From 9a35e47c2758b573e5e7b36a0569ac2d912e9391 Mon Sep 17 00:00:00 2001 From: Stefan Marchal Date: Mon, 19 Mar 2018 22:16:33 +0100 Subject: [PATCH] Added quotes around strings in json response for huemulator Bumped version number --- pom.xml | 2 +- src/main/java/com/bwssystems/HABridge/hue/HueMulator.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 285896d..39bb993 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.bwssystems.HABridge ha-bridge - 5.2.1 + 5.2.2 jar HA Bridge diff --git a/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java b/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java index c106b2f..4034578 100644 --- a/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java +++ b/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java @@ -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;