From af37d577790b8ab62582e770fef09811885be216 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:48:25 -0700 Subject: [PATCH] Fix entity picker delete entity (#20542) --- src/components/entity/ha-entity-picker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/entity/ha-entity-picker.ts b/src/components/entity/ha-entity-picker.ts index 680910d8b8..ccb233fffb 100644 --- a/src/components/entity/ha-entity-picker.ts +++ b/src/components/entity/ha-entity-picker.ts @@ -409,7 +409,7 @@ export class HaEntityPicker extends LitElement { ev.stopPropagation(); const newValue = ev.detail.value; - if (newValue.startsWith(CREATE_ID)) { + if (newValue && newValue.startsWith(CREATE_ID)) { const domain = newValue.substring(CREATE_ID.length); showHelperDetailDialog(this, { domain,