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:
@@ -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":
|
||||||
|
|||||||
Reference in New Issue
Block a user