mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Fix area picker with both entity and device filter (#8438)
This commit is contained in:
parent
79692ef58a
commit
60e4594abd
@ -140,7 +140,7 @@ export class HaAreaPicker extends SubscribeMixin(LitElement) {
|
|||||||
this._devices = devices;
|
this._devices = devices;
|
||||||
}),
|
}),
|
||||||
subscribeEntityRegistry(this.hass.connection!, (entities) => {
|
subscribeEntityRegistry(this.hass.connection!, (entities) => {
|
||||||
this._entities = entities;
|
this._entities = entities.filter((entity) => entity.area_id);
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -193,11 +193,14 @@ export class HaAreaPicker extends SubscribeMixin(LitElement) {
|
|||||||
deviceEntityLookup[entity.device_id].push(entity);
|
deviceEntityLookup[entity.device_id].push(entity);
|
||||||
}
|
}
|
||||||
inputDevices = devices;
|
inputDevices = devices;
|
||||||
inputEntities = entities.filter((entity) => entity.area_id);
|
inputEntities = entities;
|
||||||
} else if (deviceFilter) {
|
} else {
|
||||||
inputDevices = devices;
|
if (deviceFilter) {
|
||||||
} else if (entityFilter) {
|
inputDevices = devices;
|
||||||
inputEntities = entities.filter((entity) => entity.area_id);
|
}
|
||||||
|
if (entityFilter) {
|
||||||
|
inputEntities = entities;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (includeDomains) {
|
if (includeDomains) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user