diff --git a/lib/Gateway.js b/lib/Gateway.js index f88b4131bb5..e9e76228464 100755 --- a/lib/Gateway.js +++ b/lib/Gateway.js @@ -767,7 +767,7 @@ Gateway.prototype.discoverDevice = function (node, hassDevice) { const nodeName = getNodeName(node) // Set device information using node info - payload.device = deviceInfo(node, nodeName) + payload.device = deviceInfo.call(this, node, nodeName) // Set a friendly name for this component payload.name = `${nodeName}_${hassDevice.object_id}` @@ -997,7 +997,7 @@ Gateway.prototype.discoverValue = function (node, valueId) { } // Set device information using node info - payload.device = deviceInfo(node, nodeName) + payload.device = deviceInfo.call(this, node, nodeName) // multi instance devices would have same object_id if (valueId.instance > 1) cfg.object_id += '_' + valueId.instance