This commit is contained in:
Koen Kanters 2021-11-05 20:31:09 +01:00
parent 89af770d96
commit 55802ef648

View File

@ -75,7 +75,7 @@ export default class ExternalExtension extends Extension {
if (match && this.requestLookup[match[1].toLowerCase()]) {
const message = utils.parseJSON(data.message, data.message) as KeyValue;
try {
const response = this.requestLookup[match[1].toLowerCase()](message);
const response = await this.requestLookup[match[1].toLowerCase()](message);
await this.mqtt.publish(`bridge/response/extension/${match[1]}`, stringify(response));
} catch (error) {
logger.error(`Request '${data.topic}' failed with error: '${error.message}'`);