mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 18:24:36 +00:00
Fixing issues with beta, reverted back to Spark 2.3
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -63,7 +63,7 @@
|
||||
<dependency>
|
||||
<groupId>com.sparkjava</groupId>
|
||||
<artifactId>spark-core</artifactId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
|
||||
@@ -135,7 +135,7 @@ public class HarmonyHome implements Home {
|
||||
} else {
|
||||
if(anItem.getType().trim().equalsIgnoreCase(DeviceMapTypes.HARMONY_ACTIVITY[DeviceMapTypes.typeIndex]))
|
||||
{
|
||||
RunActivity anActivity = aGsonHandler.fromJson(anItem.getItem().toString(), RunActivity.class);
|
||||
RunActivity anActivity = aGsonHandler.fromJson(anItem.getItem().getAsString(), RunActivity.class);
|
||||
if(anActivity.getHub() == null || anActivity.getHub().isEmpty())
|
||||
anActivity.setHub(device.getTargetDevice());
|
||||
HarmonyHandler myHarmony = getHarmonyHandler(anActivity.getHub());
|
||||
|
||||
@@ -733,10 +733,18 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
|
||||
};
|
||||
|
||||
this.buildUrls = function (onpayload, dimpayload, offpayload, isObject, anId, deviceName, deviceTarget, deviceType, deviceMapType, count, delay) {
|
||||
var currentOn = self.state.device.onUrl;
|
||||
var currentDim = self.state.device.dimUrl;
|
||||
var currentOff = self.state.device.offUrl;
|
||||
if (self.state.device.mapType !== undefined && self.state.device.mapType !== null && self.state.device.mapType !== "") {
|
||||
var currentOn = "";
|
||||
var currentDim = "";
|
||||
var currentOff = "";
|
||||
if (self.state.device !== undefined && self.state.device !== null) {
|
||||
if (self.state.device.onUrl !== undefined && self.state.device.onUrl !== null)
|
||||
currentOn = self.state.device.onUrl;
|
||||
if (self.state.device.dimUrl !== undefined && self.state.device.dimUrl !== null)
|
||||
currentDim = self.state.device.dimUrl;
|
||||
if (self.state.device.offUrl !== undefined && self.state.device.offnUrl !== null)
|
||||
currentOff = self.state.device.offUrl;
|
||||
}
|
||||
if (self.state.device !== undefined && self.state.device !== null && self.state.device.mapType !== undefined && self.state.device.mapType !== null && self.state.device.mapType !== "") {
|
||||
self.state.device.mapId = self.state.device.mapId + "-" + anId;
|
||||
if (dimpayload !== null) {
|
||||
if (currentDim.indexOf("{\"item") !== 1 ) {
|
||||
@@ -764,7 +772,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
|
||||
currentOff = "[{\"item\":\"" + currentOff + "\",\"type\":\"" + deviceMapType + "\"}]";
|
||||
}
|
||||
self.state.device.offUrl = currentOff.substr(0, currentOff.indexOf("]")) + ",{\"item\":";
|
||||
} else if (self.state.device.mapType === undefined || self.state.device.mapType === null || self.state.device.mapType === "") {
|
||||
} else if (self.state.device === undefined || self.state.device === null || self.state.device.mapType === undefined || self.state.device.mapType === null || self.state.device.mapType === "") {
|
||||
this.clearDevice();
|
||||
self.state.device.deviceType = deviceType;
|
||||
self.state.device.name = deviceName;
|
||||
|
||||
Reference in New Issue
Block a user