diff --git a/lib/zbDeviceConfigure.js b/lib/zbDeviceConfigure.js index b2198753..dd6f0bfd 100755 --- a/lib/zbDeviceConfigure.js +++ b/lib/zbDeviceConfigure.js @@ -133,10 +133,12 @@ class DeviceConfigure extends BaseExtension { this.info(`Configuring ${device.ieeeAddr} ${device.modelID}`); const coordinatorEndpoint = await this.zigbee.getDevicesByType('Coordinator')[0].endpoints[0]; try { - await this.mappedDevice.configure(device, coordinatorEndpoint, this); - device.meta.configured = zigbeeHerdsmanConverters.getConfigureKey(mappedDevice); - device.save(); - this.info(`DeviceConfigure successful ${device.ieeeAddr} ${device.modelID}`); + if (this.mappedDevice !== null && this.mappedDevice !== undefined) { + await this.mappedDevice.configure(device, coordinatorEndpoint, this); + device.meta.configured = zigbeeHerdsmanConverters.getConfigureKey(mappedDevice); + device.save(); + this.info(`DeviceConfigure successful ${device.ieeeAddr} ${device.modelID}`); + } } catch (error) { this.sendError(error); this.error(