diff --git a/lib/extension/configure.ts b/lib/extension/configure.ts index fe2cd5822..e6befa866 100644 --- a/lib/extension/configure.ts +++ b/lib/extension/configure.ts @@ -112,7 +112,8 @@ export default class Configure extends Extension { logger.info(`Configuring '${device.name}'`); try { - await device.definition.configure(device.zh, this.zigbee.firstCoordinatorEndpoint(), logger); + await device.definition.configure(device.zh, this.zigbee.firstCoordinatorEndpoint(), logger, + device.options); logger.info(`Successfully configured '${device.name}'`); device.zh.meta.configured = zhc.getConfigureKey(device.definition); device.zh.save(); diff --git a/lib/types/types.d.ts b/lib/types/types.d.ts index 90f9aea4b..7b7b87463 100644 --- a/lib/types/types.d.ts +++ b/lib/types/types.d.ts @@ -115,7 +115,8 @@ declare global { options: zhc.DefinitionExpose[], vendor: string exposes: DefinitionExpose[] | ((device: zh.Device, options: KeyValue) => DefinitionExpose[]) - configure?: (device: zh.Device, coordinatorEndpoint: zh.Endpoint, logger: Logger) => Promise; + configure?: (device: zh.Device, coordinatorEndpoint: zh.Endpoint, logger: Logger, + options?: DeviceOptions) => Promise; onEvent?: (type: string, data: KeyValue, device: zh.Device, settings: KeyValue) => Promise; ota?: { isUpdateAvailable: (device: zh.Device, logger: Logger, data?: KeyValue) => Promise;