mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix entity areas in expose (#16402)
This commit is contained in:
parent
a293e7b91c
commit
9f195534b5
@ -344,9 +344,8 @@ export class VoiceAssistantsExpose extends LitElement {
|
||||
const entry: ExtEntityRegistryEntry | undefined =
|
||||
entities[entityState.entity_id];
|
||||
const areaId =
|
||||
entry?.area_id ?? entry?.device_id
|
||||
? devices[entry.device_id!]?.area_id
|
||||
: undefined;
|
||||
entry?.area_id ??
|
||||
(entry?.device_id ? devices[entry.device_id!]?.area_id : undefined);
|
||||
const area = areaId ? areas[areaId] : undefined;
|
||||
|
||||
result[entityState.entity_id] = {
|
||||
@ -405,9 +404,10 @@ export class VoiceAssistantsExpose extends LitElement {
|
||||
const entry: ExtEntityRegistryEntry | undefined =
|
||||
entities[entityId];
|
||||
const areaId =
|
||||
entry?.area_id ?? entry?.device_id
|
||||
entry?.area_id ??
|
||||
(entry?.device_id
|
||||
? devices[entry.device_id!]?.area_id
|
||||
: undefined;
|
||||
: undefined);
|
||||
const area = areaId ? areas[areaId] : undefined;
|
||||
result[entityId] = {
|
||||
entity_id: entityState.entity_id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user