diff --git a/src/components/ha-selector/ha-selector-attribute.ts b/src/components/ha-selector/ha-selector-attribute.ts index 50e1367dbe..597792283c 100644 --- a/src/components/ha-selector/ha-selector-attribute.ts +++ b/src/components/ha-selector/ha-selector-attribute.ts @@ -59,7 +59,8 @@ export class HaSelectorAttribute extends LitElement { if ( !this.context || - oldContext?.filter_entity === this.context.filter_entity + !oldContext || + oldContext.filter_entity === this.context.filter_entity ) { return; }