Update MMM-HomeAssistantDisplay.js

Was showing the module despite template resolving to false. Adjusted the code to check differently and set this.displayModule accordingly.
This commit is contained in:
gonzonia
2025-03-13 13:57:21 -04:00
parent d09d24436b
commit 6e1d78e4bc

View File

@@ -147,7 +147,12 @@ Module.register("MMM-HomeAssistantDisplay", {
if (payload.identifier === this.identifier) { if (payload.identifier === this.identifier) {
switch (notification) { switch (notification) {
case "MODULE_DISPLAY_RENDERED": case "MODULE_DISPLAY_RENDERED":
this.displayModule = payload.render.toLowerCase() === "true" || payload.render.toLowerCase() === "on"; // this.displayModule = payload.render.toLowerCase() === "true" || payload.render.toLowerCase() === "on";
if (payload.render.toLowerCase() === "true" || payload.render.toLowerCase() === "on"){
this.displayModule = true;
else {
this.displayModule = false;
}
this.updateDom(); this.updateDom();
break; break;
case "CHANGED_STATE": case "CHANGED_STATE":