1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Use compute domain helper

This commit is contained in:
Paul Bottein
2025-12-15 15:59:25 +01:00
parent 6180ba0156
commit cf95bf89c3

View File

@@ -1,6 +1,7 @@
import { ReactiveElement } from "lit"; import { ReactiveElement } from "lit";
import { customElement } from "lit/decorators"; import { customElement } from "lit/decorators";
import { computeDeviceName } from "../../../../common/entity/compute_device_name"; 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 { getEntityContext } from "../../../../common/entity/context/get_entity_context";
import { import {
findEntities, findEntities,
@@ -64,12 +65,12 @@ export class HomeOtherDevicesViewStrategy extends ReactiveElement {
); );
const helpersEntities = entitiesWithoutDevices.filter((entityId) => { const helpersEntities = entitiesWithoutDevices.filter((entityId) => {
const domain = entityId.split(".")[0]; const domain = computeDomain(entityId);
return isHelperDomain(domain); return isHelperDomain(domain);
}); });
const otherEntities = entitiesWithoutDevices.filter((entityId) => { const otherEntities = entitiesWithoutDevices.filter((entityId) => {
const domain = entityId.split(".")[0]; const domain = computeDomain(entityId);
return !isHelperDomain(domain); return !isHelperDomain(domain);
}); });