From 71e13d6ab32daf1fb66f972eb3d41abefbef525e Mon Sep 17 00:00:00 2001 From: RJ Fendricks Date: Sun, 22 Oct 2023 11:50:22 -0400 Subject: [PATCH] Add a timer to trigger template re-rendering --- MMM-HomeAssistantDisplay.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MMM-HomeAssistantDisplay.js b/MMM-HomeAssistantDisplay.js index 99ffe49..ef20ac0 100755 --- a/MMM-HomeAssistantDisplay.js +++ b/MMM-HomeAssistantDisplay.js @@ -52,6 +52,13 @@ Module.register("MMM-HomeAssistantDisplay", { entity: section.triggerEntities[entity] }); } + // Set up a timer to trigger re-rendering outside of any entity state update + if (section.triggerTimer) { + setInterval(()=> { + this.renderTemplates("timeout"); + this.updateDom(); + }, section.triggerTimer); + } } } this.renderTemplates("foo");