Fixed build device button in Harmony Device helper tab.

Fixes #116
This commit is contained in:
bwssystems
2016-05-15 12:25:28 -05:00
parent b5f7144c9c
commit 51ce10cfc7
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
<groupId>com.bwssystems.HABridge</groupId>
<artifactId>ha-bridge</artifactId>
<version>2.0.6</version>
<version>2.0.7</version>
<packaging>jar</packaging>
<name>HA Bridge</name>

View File

@@ -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;