This commit is contained in:
Johannes
2022-03-25 22:34:31 +01:00
parent da2b4565a4
commit 853de19a40
2 changed files with 4 additions and 3 deletions

View File

@@ -224,13 +224,14 @@ class LuiPagesGen(object):
command = f"entityUpd,|{item}|{heading}|{icon}|{title}|{author}|{volume}|{iconplaypause}"
self._send_mqtt_msg(command)
def render_page(self, page):
def render_page(self, page, send_page_type=True):
LOGGER.info(page)
config = page.data
page_type = config["type"]
LOGGER.info(f"Started rendering of page x with type {page_type}")
# Switch to page
self.page_type(page_type)
if send_page_type:
self.page_type(page_type)
if page_type in ["cardEntities", "cardGrid"]:
heading = config.get("heading", "unknown")
self.generate_entities_page(heading, page.get_items())