mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 08:13:23 +00:00
Fix issue with LIFx bcast being null. Continue fixing bulk add.
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.bwssystems.HABridge</groupId>
|
<groupId>com.bwssystems.HABridge</groupId>
|
||||||
<artifactId>ha-bridge</artifactId>
|
<artifactId>ha-bridge</artifactId>
|
||||||
<version>4.1.4a</version>
|
<version>4.1.4b</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>HA Bridge</name>
|
<name>HA Bridge</name>
|
||||||
|
|||||||
@@ -64,24 +64,33 @@ public class LifxHome implements Home {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(bcastInetAddr != null) {
|
||||||
lifxMap = new HashMap<String, LifxDevice>();
|
lifxMap = new HashMap<String, LifxDevice>();
|
||||||
log.info("Opening LFX Client with broadcast address: " + bcastInetAddr.getHostAddress());
|
log.info("Opening LFX Client with broadcast address: " + bcastInetAddr.getHostAddress());
|
||||||
client = new LFXClient(bcastInetAddr.getHostAddress());
|
client = new LFXClient(bcastInetAddr.getHostAddress());
|
||||||
client.getLights().addLightCollectionListener(new MyLightListener(lifxMap));
|
client.getLights().addLightCollectionListener(new MyLightListener(lifxMap));
|
||||||
client.getGroups().addGroupCollectionListener(new MyGroupListener(lifxMap));
|
client.getGroups().addGroupCollectionListener(new MyGroupListener(lifxMap));
|
||||||
client.open(false);
|
client.open(false);
|
||||||
|
aGsonHandler =
|
||||||
|
new GsonBuilder()
|
||||||
|
.create();
|
||||||
|
} else {
|
||||||
|
log.warn("Could not open LIFX, no bcast addr available, check your upnp config address.");
|
||||||
|
client = null;
|
||||||
|
validLifx = false;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.warn("Could not open LIFX, with IO Exception", e);
|
log.warn("Could not open LIFX, with IO Exception", e);
|
||||||
client = null;
|
client = null;
|
||||||
|
validLifx = false;
|
||||||
return this;
|
return this;
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
log.warn("Could not open LIFX, with Interruprted Exception", e);
|
log.warn("Could not open LIFX, with Interruprted Exception", e);
|
||||||
client = null;
|
client = null;
|
||||||
|
validLifx = false;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
aGsonHandler =
|
|
||||||
new GsonBuilder()
|
|
||||||
.create();
|
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1986,77 +1986,7 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
|
|||||||
$scope.device = bridgeService.state.device;
|
$scope.device = bridgeService.state.device;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.buildDeviceUrls = function (hassdevice, dim_control) {
|
$scope.buildDeviceUrls = function (hassdevice, dim_control, buildonly) {
|
||||||
onpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
if((dim_control.indexOf("byte") >= 0 || dim_control.indexOf("percent") >= 0 || dim_control.indexOf("math") >= 0))
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\",\"bri\":\"" + dim_control + "\"}";
|
|
||||||
else
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
offpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"off\"}";
|
|
||||||
|
|
||||||
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
|
|
||||||
$scope.device = bridgeService.state.device;
|
|
||||||
bridgeService.editNewDevice($scope.device);
|
|
||||||
$location.path('/editdevice');
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.buildHassHeatUrls = function (hassdevice) {
|
|
||||||
onpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
if((dim_control.indexOf("byte") >= 0 || dim_control.indexOf("percent") >= 0 || dim_control.indexOf("math") >= 0))
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\",\"bri\":\"" + dim_control + "\"}";
|
|
||||||
else
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
offpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"off\"}";
|
|
||||||
|
|
||||||
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
|
|
||||||
$scope.device = bridgeService.state.device;
|
|
||||||
bridgeService.editNewDevice($scope.device);
|
|
||||||
$location.path('/editdevice');
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.buildHassCoolUrls = function (hassdevice) {
|
|
||||||
onpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
if((dim_control.indexOf("byte") >= 0 || dim_control.indexOf("percent") >= 0 || dim_control.indexOf("math") >= 0))
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\",\"bri\":\"" + dim_control + "\"}";
|
|
||||||
else
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
offpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"off\"}";
|
|
||||||
|
|
||||||
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
|
|
||||||
$scope.device = bridgeService.state.device;
|
|
||||||
bridgeService.editNewDevice($scope.device);
|
|
||||||
$location.path('/editdevice');
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.buildHassAutoUrls = function (hassdevice) {
|
|
||||||
onpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
if((dim_control.indexOf("byte") >= 0 || dim_control.indexOf("percent") >= 0 || dim_control.indexOf("math") >= 0))
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\",\"bri\":\"" + dim_control + "\"}";
|
|
||||||
else
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
offpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"off\"}";
|
|
||||||
|
|
||||||
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
|
|
||||||
$scope.device = bridgeService.state.device;
|
|
||||||
bridgeService.editNewDevice($scope.device);
|
|
||||||
$location.path('/editdevice');
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.buildHassOffUrls = function (hassdevice) {
|
|
||||||
onpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
if((dim_control.indexOf("byte") >= 0 || dim_control.indexOf("percent") >= 0 || dim_control.indexOf("math") >= 0))
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\",\"bri\":\"" + dim_control + "\"}";
|
|
||||||
else
|
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
|
||||||
offpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"off\"}";
|
|
||||||
|
|
||||||
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
|
|
||||||
$scope.device = bridgeService.state.device;
|
|
||||||
bridgeService.editNewDevice($scope.device);
|
|
||||||
$location.path('/editdevice');
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.buildHassFanUrls = function (hassdevice) {
|
|
||||||
onpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
onpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}";
|
||||||
if((dim_control.indexOf("byte") >= 0 || dim_control.indexOf("percent") >= 0 || dim_control.indexOf("math") >= 0))
|
if((dim_control.indexOf("byte") >= 0 || dim_control.indexOf("percent") >= 0 || dim_control.indexOf("math") >= 0))
|
||||||
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\",\"bri\":\"" + dim_control + "\"}";
|
dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\",\"bri\":\"" + dim_control + "\"}";
|
||||||
@@ -2066,19 +1996,19 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
|
|||||||
|
|
||||||
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
|
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
|
||||||
$scope.device = bridgeService.state.device;
|
$scope.device = bridgeService.state.device;
|
||||||
|
if (!buildonly) {
|
||||||
bridgeService.editNewDevice($scope.device);
|
bridgeService.editNewDevice($scope.device);
|
||||||
$location.path('/editdevice');
|
$location.path('/editdevice');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.bulkAddDevices = function(dim_control) {
|
$scope.bulkAddDevices = function(dim_control) {
|
||||||
var devicesList = [];
|
var devicesList = [];
|
||||||
|
$scope.clearDevice();
|
||||||
for(var i = 0; i < $scope.bulk.devices.length; i++) {
|
for(var i = 0; i < $scope.bulk.devices.length; i++) {
|
||||||
for(var x = 0; x < bridgeService.state.hassdevices.length; x++) {
|
for(var x = 0; x < bridgeService.state.hassdevices.length; x++) {
|
||||||
if(bridgeService.state.hassdevices[x].deviceName === $scope.bulk.devices[i]) {
|
if(bridgeService.state.hassdevices[x].deviceState.entity_id === $scope.bulk.devices[i] && bridgeService.state.hassdevices[x].domain !== "sensor" && bridgeService.state.hassdevices[x].domain !== "sun") {
|
||||||
if(bridgeService.state.hassdevices[x].domain === "climate")
|
$scope.buildDeviceUrls(bridgeService.state.hassdevices[x],dim_control,true);
|
||||||
$scope.buildHassAutoUrls(bridgeService.state.hassdevices[x]);
|
|
||||||
else
|
|
||||||
$scope.buildDeviceUrls(bridgeService.state.hassdevices[x],dim_control);
|
|
||||||
devicesList[i] = {
|
devicesList[i] = {
|
||||||
name: $scope.device.name,
|
name: $scope.device.name,
|
||||||
mapId: $scope.device.mapId,
|
mapId: $scope.device.mapId,
|
||||||
@@ -2095,6 +2025,7 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
|
|||||||
contentBodyDim: $scope.device.contentBodyDim,
|
contentBodyDim: $scope.device.contentBodyDim,
|
||||||
contentBodyOff: $scope.device.contentBodyOff
|
contentBodyOff: $scope.device.contentBodyOff
|
||||||
};
|
};
|
||||||
|
$scope.clearDevice();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2102,7 +2033,7 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
|
|||||||
function () {
|
function () {
|
||||||
$scope.clearDevice();
|
$scope.clearDevice();
|
||||||
bridgeService.viewDevices();
|
bridgeService.viewDevices();
|
||||||
bridgeService.viewhassdevices();
|
bridgeService.viewHassDevices();
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
bridgeService.displayWarn("Error adding Hass devices in bulk.", error)
|
bridgeService.displayWarn("Error adding Hass devices in bulk.", error)
|
||||||
@@ -2137,8 +2068,8 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
|
|||||||
else {
|
else {
|
||||||
$scope.selectAll = true;
|
$scope.selectAll = true;
|
||||||
for(var x = 0; x < bridgeService.state.hassdevices.length; x++) {
|
for(var x = 0; x < bridgeService.state.hassdevices.length; x++) {
|
||||||
if($scope.bulk.devices.indexOf(bridgeService.state.hassdevices[x]) < 0 && !bridgeService.findDeviceByMapId(bridgeService.state.hassdevices[x].hassdevicename + "-" + bridgeService.state.hassdevices[x].halname, bridgeService.state.hassdevices[x].halname, "hassdevice"))
|
if($scope.bulk.devices.indexOf(bridgeService.state.hassdevices[x].deviceState.entity_id) < 0 && bridgeService.state.hassdevices[x].domain !== "sensor" && bridgeService.state.hassdevices[x].domain !== "sun")
|
||||||
$scope.bulk.devices.push(bridgeService.state.hassdevices[x].hassdevicename);
|
$scope.bulk.devices.push(bridgeService.state.hassdevices[x].deviceState.entity_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -2181,7 +2112,7 @@ app.controller('DomoticzController', function ($scope, $location, $http, bridgeS
|
|||||||
$scope.device = bridgeService.state.device;
|
$scope.device = bridgeService.state.device;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.buildDeviceUrls = function (domoticzdevice, dim_control) {
|
$scope.buildDeviceUrls = function (domoticzdevice, dim_control, buildonly) {
|
||||||
var preCmd = "";
|
var preCmd = "";
|
||||||
var postOnCmd = "";
|
var postOnCmd = "";
|
||||||
var postDimCmd = "";
|
var postDimCmd = "";
|
||||||
@@ -2220,16 +2151,19 @@ app.controller('DomoticzController', function ($scope, $location, $http, bridgeS
|
|||||||
+ postOffCmd;
|
+ postOffCmd;
|
||||||
bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, domoticzdevice.devicename + "-" + domoticzdevice.domoticzname, domoticzdevice.devicename, domoticzdevice.domoticzname, aDeviceType, "domoticzDevice", null, null);
|
bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, domoticzdevice.devicename + "-" + domoticzdevice.domoticzname, domoticzdevice.devicename, domoticzdevice.domoticzname, aDeviceType, "domoticzDevice", null, null);
|
||||||
$scope.device = bridgeService.state.device;
|
$scope.device = bridgeService.state.device;
|
||||||
|
if (!buildonly) {
|
||||||
bridgeService.editNewDevice($scope.device);
|
bridgeService.editNewDevice($scope.device);
|
||||||
$location.path('/editdevice');
|
$location.path('/editdevice');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.bulkAddDevices = function(dim_control) {
|
$scope.bulkAddDevices = function(dim_control) {
|
||||||
var devicesList = [];
|
var devicesList = [];
|
||||||
|
$scope.clearDevice();
|
||||||
for(var i = 0; i < $scope.bulk.devices.length; i++) {
|
for(var i = 0; i < $scope.bulk.devices.length; i++) {
|
||||||
for(var x = 0; x < bridgeService.state.domoticzdevices.length; x++) {
|
for(var x = 0; x < bridgeService.state.domoticzdevices.length; x++) {
|
||||||
if(bridgeService.state.domoticzdevices[x].devicename === $scope.bulk.devices[i]) {
|
if(bridgeService.state.domoticzdevices[x].devicename === $scope.bulk.devices[i]) {
|
||||||
$scope.buildDeviceUrls(bridgeService.state.domoticzdevices[x],dim_control);
|
$scope.buildDeviceUrls(bridgeService.state.domoticzdevices[x],dim_control,true);
|
||||||
devicesList[i] = {
|
devicesList[i] = {
|
||||||
name: $scope.device.name,
|
name: $scope.device.name,
|
||||||
mapId: $scope.device.mapId,
|
mapId: $scope.device.mapId,
|
||||||
@@ -2246,6 +2180,7 @@ app.controller('DomoticzController', function ($scope, $location, $http, bridgeS
|
|||||||
contentBodyDim: $scope.device.contentBodyDim,
|
contentBodyDim: $scope.device.contentBodyDim,
|
||||||
contentBodyOff: $scope.device.contentBodyOff
|
contentBodyOff: $scope.device.contentBodyOff
|
||||||
};
|
};
|
||||||
|
$scope.clearDevice();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2332,14 +2267,16 @@ app.controller('LifxController', function ($scope, $location, $http, bridgeServi
|
|||||||
$scope.device = bridgeService.state.device;
|
$scope.device = bridgeService.state.device;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.buildDeviceUrls = function (lifxdevice, dim_control) {
|
$scope.buildDeviceUrls = function (lifxdevice, dim_control, buildonly) {
|
||||||
dimpayload = angular.toJson(lifxdevice);
|
dimpayload = angular.toJson(lifxdevice);
|
||||||
onpayload = angular.toJson(lifxdevice);
|
onpayload = angular.toJson(lifxdevice);
|
||||||
offpayload = angular.toJson(lifxdevice);
|
offpayload = angular.toJson(lifxdevice);
|
||||||
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, lifxdevice.name, lifxdevice.name, lifxdevice.name, null, "lifxDevice", null, null);
|
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, lifxdevice.name, lifxdevice.name, lifxdevice.name, null, "lifxDevice", null, null);
|
||||||
$scope.device = bridgeService.state.device;
|
$scope.device = bridgeService.state.device;
|
||||||
|
if (!buildonly) {
|
||||||
bridgeService.editNewDevice($scope.device);
|
bridgeService.editNewDevice($scope.device);
|
||||||
$location.path('/editdevice');
|
$location.path('/editdevice');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.bulkAddDevices = function(dim_control) {
|
$scope.bulkAddDevices = function(dim_control) {
|
||||||
@@ -2347,7 +2284,7 @@ app.controller('LifxController', function ($scope, $location, $http, bridgeServi
|
|||||||
for(var i = 0; i < $scope.bulk.devices.length; i++) {
|
for(var i = 0; i < $scope.bulk.devices.length; i++) {
|
||||||
for(var x = 0; x < bridgeService.state.lifxdevices.length; x++) {
|
for(var x = 0; x < bridgeService.state.lifxdevices.length; x++) {
|
||||||
if(bridgeService.state.lifxdevices[x].devicename === $scope.bulk.devices[i]) {
|
if(bridgeService.state.lifxdevices[x].devicename === $scope.bulk.devices[i]) {
|
||||||
$scope.buildDeviceUrls(bridgeService.state.lifxdevices[x],dim_control);
|
$scope.buildDeviceUrls(bridgeService.state.lifxdevices[x],dim_control,true);
|
||||||
devicesList[i] = {
|
devicesList[i] = {
|
||||||
name: $scope.device.name,
|
name: $scope.device.name,
|
||||||
mapId: $scope.device.mapId,
|
mapId: $scope.device.mapId,
|
||||||
|
|||||||
@@ -73,26 +73,8 @@
|
|||||||
{{hassdevice.deviceState.entity_id}}</td>
|
{{hassdevice.deviceState.entity_id}}</td>
|
||||||
<td>{{hassdevice.hassname}}</td>
|
<td>{{hassdevice.hassname}}</td>
|
||||||
<td>
|
<td>
|
||||||
<button ng-if="hassdevice.domain != 'climate' && hassdevice.domain != 'sensor' && hassdevice.domain != 'sun'" class="btn btn-success" type="submit"
|
<button ng-if="hassdevice.domain != 'sensor' && hassdevice.domain != 'sun'" class="btn btn-success" type="submit"
|
||||||
ng-click="buildDeviceUrls(hassdevice, device_dim_control)">Build Item</button>
|
ng-click="buildDeviceUrls(hassdevice, device_dim_control, false)">Build Item</button>
|
||||||
<ul ng-if="hassdevice.domain == 'climate'" class="list-group">
|
|
||||||
<li class="list-group-item">
|
|
||||||
<p>
|
|
||||||
<button class="btn btn-success" type="submit"
|
|
||||||
ng-click="buildhassHeatUrls(hassdevice)">Heat</button>
|
|
||||||
<button class="btn btn-success" type="submit"
|
|
||||||
ng-click="buildhassCoolUrls(hassdevice)">Cool</button>
|
|
||||||
<button class="btn btn-success" type="submit"
|
|
||||||
ng-click="buildhassAutoUrls(hassdevice)">Auto</button>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<button class="btn btn-success" type="submit"
|
|
||||||
ng-click="buildhassOffUrls(hassdevice)">Off</button>
|
|
||||||
<button class="btn btn-success" type="submit"
|
|
||||||
ng-click="buildhassFanUrls(hassdevice)">Fan</button>
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user