mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-19 08:28:46 +00:00
Fix immediate issues for JSON decoding
Fixes #391 Fixes #392 Fixes #398
This commit is contained in:
@@ -152,7 +152,12 @@ public class HarmonyHome implements Home {
|
||||
myHarmony.startActivity(anActivity);
|
||||
}
|
||||
} else if(anItem.getType().trim().equalsIgnoreCase(DeviceMapTypes.HARMONY_BUTTON[DeviceMapTypes.typeIndex])) {
|
||||
String url = anItem.getItem().toString();
|
||||
String url = null;
|
||||
if(anItem.getItem().isJsonObject()) {
|
||||
url = aGsonHandler.toJson(anItem.getItem());
|
||||
} else
|
||||
url = anItem.getItem().getAsString();
|
||||
|
||||
if (url.substring(0, 1).equalsIgnoreCase("{")) {
|
||||
url = "[" + url + "]";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user