From 51ce10cfc7e8f6812438a163412f3da1ff57e342 Mon Sep 17 00:00:00 2001 From: bwssystems Date: Sun, 15 May 2016 12:25:28 -0500 Subject: [PATCH] Fixed build device button in Harmony Device helper tab. Fixes #116 --- pom.xml | 2 +- src/main/resources/public/scripts/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0977c98..cf9bade 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.bwssystems.HABridge ha-bridge - 2.0.6 + 2.0.7 jar HA Bridge diff --git a/src/main/resources/public/scripts/app.js b/src/main/resources/public/scripts/app.js index e3e66be..9eae577 100644 --- a/src/main/resources/public/scripts/app.js +++ b/src/main/resources/public/scripts/app.js @@ -988,7 +988,6 @@ app.controller('HarmonyController', function ($scope, $location, $http, bridgeSe }; $scope.buildButtonUrls = function (harmonydevice, onbutton, offbutton) { - bridgeService.clearDevice(); var currentOn = $scope.device.onUrl; var currentOff = $scope.device.offUrl; var actionOn = angular.fromJson(onbutton); @@ -999,6 +998,7 @@ app.controller('HarmonyController', function ($scope, $location, $http, bridgeSe $scope.device.offUrl = currentOff.substr(0, currentOff.indexOf("]")) + ",{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOff.command + "\"}]"; } else if ($scope.device.mapType == null || $scope.device.mapType == "") { + bridgeService.clearDevice(); $scope.device.deviceType = "button"; $scope.device.targetDevice = harmonydevice.hub; $scope.device.name = harmonydevice.device.label;