mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 19:09:48 +00:00
Include non-primary entities targeted directly by label (#26952)
This commit is contained in:
@@ -592,7 +592,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||
if (
|
||||
entity.labels.includes(target.id) &&
|
||||
!this.value!.entity_id?.includes(entity.entity_id) &&
|
||||
this._entityRegMeetsFilter(entity)
|
||||
this._entityRegMeetsFilter(entity, true)
|
||||
) {
|
||||
newEntities.push(entity.entity_id);
|
||||
}
|
||||
@@ -717,8 +717,11 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||
return true;
|
||||
}
|
||||
|
||||
private _entityRegMeetsFilter(entity: EntityRegistryDisplayEntry): boolean {
|
||||
if (entity.hidden || entity.entity_category) {
|
||||
private _entityRegMeetsFilter(
|
||||
entity: EntityRegistryDisplayEntry,
|
||||
includeSecondary = false
|
||||
): boolean {
|
||||
if (entity.hidden || (entity.entity_category && !includeSecondary)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user