mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-12 20:40:29 +00:00
Allow null selector (#14212)
This commit is contained in:
@@ -30,9 +30,9 @@ export class HaSelectorAttribute extends SubscribeMixin(LitElement) {
|
||||
return html`
|
||||
<ha-entity-attribute-picker
|
||||
.hass=${this.hass}
|
||||
.entityId=${this.selector.attribute.entity_id ||
|
||||
.entityId=${this.selector.attribute?.entity_id ||
|
||||
this.context?.filter_entity}
|
||||
.hideAttributes=${this.selector.attribute.hide_attributes}
|
||||
.hideAttributes=${this.selector.attribute?.hide_attributes}
|
||||
.value=${this.value}
|
||||
.label=${this.label}
|
||||
.helper=${this.helper}
|
||||
@@ -49,7 +49,7 @@ export class HaSelectorAttribute extends SubscribeMixin(LitElement) {
|
||||
// No need to filter value if no value
|
||||
!this.value ||
|
||||
// Only adjust value if we used the context
|
||||
this.selector.attribute.entity_id ||
|
||||
this.selector.attribute?.entity_id ||
|
||||
// Only check if context has changed
|
||||
!changedProps.has("context")
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user