Fix LiftMaster shim

For those of us without multiple garage doors...
This commit is contained in:
Nick Farina
2015-08-13 20:25:06 -07:00
parent 2c94d72afe
commit 4d9897ff26

View File

@@ -92,7 +92,7 @@ LiftMasterAccessory.prototype = {
if (device["MyQDeviceTypeName"] == "GarageDoorOpener") {
// If we haven't explicity specified a door ID, we'll loop to make sure we don't have multiple openers, which is confusing
if (that.requiredDeviceId == undefined) {
if (!that.requiredDeviceId) {
var thisDeviceId = device.MyQDeviceId;
var thisDoorName = "Unknown";
for (var j = 0; j < device.Attributes.length; j ++) {
@@ -103,6 +103,7 @@ LiftMasterAccessory.prototype = {
}
}
foundDoors.push(thisDeviceId + " - " + thisDoorName);
that.deviceId = thisDeviceId;
}
// We specified a door ID, sanity check to make sure it's the one we expected