From e8cc170c0c92298e196a3b642f8dcecc47e10eff Mon Sep 17 00:00:00 2001 From: Johannes <29555657+joBr99@users.noreply.github.com> Date: Sun, 21 May 2023 13:45:10 +0200 Subject: [PATCH] Update pages.py --- apps/nspanel-lovelace-ui/luibackend/pages.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 45076240..218050e2 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -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")