added exec:// type for loops. updated button maptypeid naming.

Fixes #114
Fixes #115
This commit is contained in:
Admin
2016-05-11 12:23:43 -05:00
parent 3e890721c5
commit 86a931d383
4 changed files with 42 additions and 14 deletions

View File

@@ -994,6 +994,7 @@ app.controller('HarmonyController', function ($scope, $location, $http, bridgeSe
var actionOn = angular.fromJson(onbutton);
var actionOff = angular.fromJson(offbutton);
if( $scope.device.mapType == "harmonyButton") {
$scope.device.mapId = $scope.device.mapId + "-" + actionOn.command;
$scope.device.onUrl = currentOn.substr(0, currentOn.indexOf("]")) + ",{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOn.command + "\"}]";
$scope.device.offUrl = currentOff.substr(0, currentOff.indexOf("]")) + ",{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOff.command + "\"}]";
}
@@ -1002,7 +1003,7 @@ app.controller('HarmonyController', function ($scope, $location, $http, bridgeSe
$scope.device.targetDevice = harmonydevice.hub;
$scope.device.name = harmonydevice.device.label;
$scope.device.mapType = "harmonyButton";
$scope.device.mapId = harmonydevice.device.id + "-" + actionOn.command + "-" + actionOff.command;
$scope.device.mapId = harmonydevice.device.id + "-" + actionOn.command;
$scope.device.onUrl = "[{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOn.command + "\"}]";
$scope.device.offUrl = "[{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOff.command + "\"}]";
}