From 2d7a6ecaf3f0c0cffaf072df05d9d3eef43119c1 Mon Sep 17 00:00:00 2001 From: Koenkk Date: Mon, 28 May 2018 19:41:27 +0200 Subject: [PATCH] homeassistant discovery: fix crash when not in configuration.yaml. #63 --- lib/homeassistant.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/homeassistant.js b/lib/homeassistant.js index f2ba2eb8..dfbac689 100644 --- a/lib/homeassistant.js +++ b/lib/homeassistant.js @@ -234,7 +234,7 @@ const discovered = {}; function discover(deviceID, model, mqtt) { // Check if already discoverd and check if there are configs. - if (discovered[deviceID] || !mapping[model]) { + if (discovered[deviceID] || !mapping[model] || !settings.getDevice(deviceID)) { return; }