Compare commits

..

2 Commits

Author SHA1 Message Date
Johannes
e8cc170c0c Update pages.py 2023-05-21 13:45:10 +02:00
Johannes
94d0d176e5 Update controller.py 2023-05-21 13:43:49 +02:00
2 changed files with 5 additions and 2 deletions

View File

@@ -146,7 +146,7 @@ class LuiController(object):
items = self._config.get_all_entity_names()
apis.ha_api.log(f"gtest123: {items}")
prefixes = ("navigate.", "delete", "iText")
items = [x for x in items if not (x.startswith(prefixes) or x is None)]
items = [x for x in items if not (x is None or x.startswith(prefixes))]
apis.ha_api.log(f"Registering callbacks for the following items: {items}")
for item in items:
if apis.ha_api.entity_exists(item):

View File

@@ -178,7 +178,10 @@ class LuiPagesGen(object):
name = apis.ha_api.render_template(item.nameOverride)
# type of the item is the string before the "." in the entityId
entityType = entityId.split(".")[0]
if entityId is not None:
entityType = entityId.split(".")[0]
else
entityType = "delete"
apis.ha_api.log(f"Generating item for {entityId} with type {entityType}", level="DEBUG")