diff --git a/lib/controller.js b/lib/controller.js index e0fb7de0..0a45692a 100644 --- a/lib/controller.js +++ b/lib/controller.js @@ -209,11 +209,12 @@ class Controller { this.softResetTimeout(true); logger.debug('Recieved zigbee message with data', JSON.stringify(message.data)); - - if (message.type == 'devInterview') { + if (message.type == 'devInterview' && !settings.getDevice(message.data)) { logger.info('Connecting with device...'); this.mqtt.log('pairing', 'connecting with device'); - } else if (message.type == 'devIncoming') { + } + + if (message.type == 'devIncoming') { logger.info('Device incoming...'); this.mqtt.log('pairing', 'device incoming'); }