homeassistant discovery: fix crash when not in configuration.yaml. #63

This commit is contained in:
Koenkk
2018-05-28 19:41:27 +02:00
parent 7801493a7a
commit 2d7a6ecaf3
+1 -1
View File
@@ -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;
}