Convert module-start to async (#3049)

Similar to the node_helper async start PR...

---------

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck
2023-02-22 18:58:29 +01:00
committed by GitHub
parent fe0b915a5d
commit 498b440174
5 changed files with 34 additions and 19 deletions

View File

@@ -44,7 +44,7 @@ Module.register("alert", {
return `templates/${type}.njk`;
},
start() {
async start() {
Log.info(`Starting module: ${this.name}`);
if (this.config.effect === "slide") {
@@ -53,7 +53,7 @@ Module.register("alert", {
if (this.config.welcome_message) {
const message = this.config.welcome_message === true ? this.translate("welcome") : this.config.welcome_message;
this.showNotification({ title: this.translate("sysTitle"), message });
await this.showNotification({ title: this.translate("sysTitle"), message });
}
},