diff --git a/src/panels/lovelace/common/compute-unused-entities.ts b/src/panels/lovelace/common/compute-unused-entities.ts index dd2fafe89108..ff563456e0d2 100755 --- a/src/panels/lovelace/common/compute-unused-entities.ts +++ b/src/panels/lovelace/common/compute-unused-entities.ts @@ -26,6 +26,9 @@ const addFromAction = (entities: Set, actionConfig: ActionConfig) => { }; const addEntityId = (entities: Set, entity) => { + if (!entity) { + return; + } if (typeof entity === "string") { entities.add(entity); return;