From 4d9897ff26e9dfe7ac8c987ce57b1ce18b2ccabd Mon Sep 17 00:00:00 2001 From: Nick Farina Date: Thu, 13 Aug 2015 20:25:06 -0700 Subject: [PATCH] Fix LiftMaster shim For those of us without multiple garage doors... --- accessories/LiftMaster.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accessories/LiftMaster.js b/accessories/LiftMaster.js index 8d67b6c..baf3be8 100644 --- a/accessories/LiftMaster.js +++ b/accessories/LiftMaster.js @@ -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