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;