From 5795b8787d706e0d58b9e7b708486a2e6ac066c1 Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Wed, 21 Jan 2026 09:22:38 +0000 Subject: [PATCH] Allow helpers area id to fallback to device area if not set (#29093) --- src/panels/config/helpers/ha-config-helpers.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/panels/config/helpers/ha-config-helpers.ts b/src/panels/config/helpers/ha-config-helpers.ts index 8c614e9404..168865102f 100644 --- a/src/panels/config/helpers/ha-config-helpers.ts +++ b/src/panels/config/helpers/ha-config-helpers.ts @@ -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])