mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 22:47:01 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7de710de5 | ||
|
|
e8cc170c0c | ||
|
|
94d0d176e5 |
@@ -146,7 +146,7 @@ class LuiController(object):
|
|||||||
items = self._config.get_all_entity_names()
|
items = self._config.get_all_entity_names()
|
||||||
apis.ha_api.log(f"gtest123: {items}")
|
apis.ha_api.log(f"gtest123: {items}")
|
||||||
prefixes = ("navigate.", "delete", "iText")
|
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}")
|
apis.ha_api.log(f"Registering callbacks for the following items: {items}")
|
||||||
for item in items:
|
for item in items:
|
||||||
if apis.ha_api.entity_exists(item):
|
if apis.ha_api.entity_exists(item):
|
||||||
|
|||||||
@@ -178,7 +178,10 @@ class LuiPagesGen(object):
|
|||||||
name = apis.ha_api.render_template(item.nameOverride)
|
name = apis.ha_api.render_template(item.nameOverride)
|
||||||
|
|
||||||
# type of the item is the string before the "." in the entityId
|
# 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")
|
apis.ha_api.log(f"Generating item for {entityId} with type {entityType}", level="DEBUG")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user