From 76131ff09efdbf08d8d8a29900e835d428ddf1ff Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 20:27:00 +0200 Subject: [PATCH] =?UTF-8?q?Hide=20standalone=20helpers=20and=20entities=20?= =?UTF-8?q?from=20the=20Home=20=E2=80=9COther=20devices=E2=80=9D=20view=20?= =?UTF-8?q?(#51853)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial plan * Hide standalone helpers and entities from other devices view Agent-Logs-Url: https://github.com/home-assistant/frontend/sessions/ecad0a9d-6983-4c5c-9728-6ef04be88e42 * Simplify other devices strategy test assertions Agent-Logs-Url: https://github.com/home-assistant/frontend/sessions/ecad0a9d-6983-4c5c-9728-6ef04be88e42 * Clean up other devices strategy test helpers Agent-Logs-Url: https://github.com/home-assistant/frontend/sessions/ecad0a9d-6983-4c5c-9728-6ef04be88e42 * Polish other devices strategy test fixtures Agent-Logs-Url: https://github.com/home-assistant/frontend/sessions/ecad0a9d-6983-4c5c-9728-6ef04be88e42 * Remove other devices strategy test file Agent-Logs-Url: https://github.com/home-assistant/frontend/sessions/2a54dac8-a7fc-42e5-a309-e0af02ca4303 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- .../home/home-other-devices-view-strategy.ts | 52 ------------------- 1 file changed, 52 deletions(-) diff --git a/src/panels/lovelace/strategies/home/home-other-devices-view-strategy.ts b/src/panels/lovelace/strategies/home/home-other-devices-view-strategy.ts index 9eb2a8d21b..95f3601fca 100644 --- a/src/panels/lovelace/strategies/home/home-other-devices-view-strategy.ts +++ b/src/panels/lovelace/strategies/home/home-other-devices-view-strategy.ts @@ -1,7 +1,6 @@ import { ReactiveElement } from "lit"; import { customElement } from "lit/decorators"; import { computeDeviceName } from "../../../../common/entity/compute_device_name"; -import { computeDomain } from "../../../../common/entity/compute_domain"; import { getEntityContext } from "../../../../common/entity/context/get_entity_context"; import { findEntities, @@ -11,7 +10,6 @@ import { clamp } from "../../../../common/number/clamp"; import type { LovelaceSectionRawConfig } from "../../../../data/lovelace/config/section"; import type { LovelaceViewConfig } from "../../../../data/lovelace/config/view"; import type { HomeAssistant } from "../../../../types"; -import { isHelperDomain } from "../../../config/helpers/const"; import type { EmptyStateCardConfig, EntitiesCardConfig, @@ -41,7 +39,6 @@ export class HomeOtherDevicesViewStrategy extends ReactiveElement { const sections: LovelaceSectionRawConfig[] = []; const entitiesByDevice: Record = {}; - const entitiesWithoutDevices: string[] = []; for (const entityId of otherDevicesEntities) { const stateObj = hass.states[entityId]; if (!stateObj) continue; @@ -53,7 +50,6 @@ export class HomeOtherDevicesViewStrategy extends ReactiveElement { hass.floors ); if (!device) { - entitiesWithoutDevices.push(entityId); continue; } if (!(device.id in entitiesByDevice)) { @@ -69,16 +65,6 @@ export class HomeOtherDevicesViewStrategy extends ReactiveElement { }) ); - const helpersEntities = entitiesWithoutDevices.filter((entityId) => { - const domain = computeDomain(entityId); - return isHelperDomain(domain); - }); - - const otherEntities = entitiesWithoutDevices.filter((entityId) => { - const domain = computeDomain(entityId); - return !isHelperDomain(domain); - }); - const primaryFilter = generateEntityFilter(hass, { entity_category: "none", }); @@ -149,44 +135,6 @@ export class HomeOtherDevicesViewStrategy extends ReactiveElement { // Allow between 2 and 3 columns (the max should be set to define the width of the header) const maxColumns = clamp(sections.length, 2, 3); - if (helpersEntities.length) { - sections.push({ - type: "grid", - column_span: maxColumns, - cards: [ - { - type: "heading", - heading: hass.localize( - "ui.panel.lovelace.strategy.home-other-devices.helpers" - ), - } satisfies HeadingCardConfig, - ...helpersEntities.map((e) => ({ - type: "tile", - entity: e, - })), - ], - }); - } - - if (otherEntities.length) { - sections.push({ - type: "grid", - column_span: maxColumns, - cards: [ - { - type: "heading", - heading: hass.localize( - "ui.panel.lovelace.strategy.home-other-devices.entities" - ), - } satisfies HeadingCardConfig, - ...otherEntities.map((e) => ({ - type: "tile", - entity: e, - })), - ], - }); - } - // No sections, show empty state if (sections.length === 0) { return {