1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-15 07:25:54 +00:00

Allow helpers area id to fallback to device area if not set (#29093)

This commit is contained in:
Aidan Timson
2026-01-21 09:22:38 +00:00
committed by GitHub
parent ec742d3342
commit 5795b8787d

View File

@@ -601,7 +601,9 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
entityRegistryByEntityId(entityReg)[item.entity_id];
const labels = labelReg && entityRegEntry?.labels;
const category = entityRegEntry?.categories.helpers;
const areaId = entityRegEntry?.area_id;
const deviceId = entityRegEntry?.device_id;
const areaId =
entityRegEntry?.area_id || this.hass.devices?.[deviceId!]?.area_id;
const area =
areaId && this.hass.areas?.[areaId]
? computeAreaName(this.hass.areas[areaId])