mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 19:56:42 +00:00
Allow to group entities by domain (#20580)
Allow group entities by domain
This commit is contained in:
parent
62f46baacf
commit
4d21f9e80c
@ -94,6 +94,7 @@ import {
|
|||||||
hasRejectedItems,
|
hasRejectedItems,
|
||||||
rejectedItems,
|
rejectedItems,
|
||||||
} from "../../../common/util/promise-all-settled-results";
|
} from "../../../common/util/promise-all-settled-results";
|
||||||
|
import { domainToName } from "../../../data/integration";
|
||||||
|
|
||||||
export interface StateEntity
|
export interface StateEntity
|
||||||
extends Omit<EntityRegistryEntry, "id" | "unique_id"> {
|
extends Omit<EntityRegistryEntry, "id" | "unique_id"> {
|
||||||
@ -110,6 +111,7 @@ export interface EntityRow extends StateEntity {
|
|||||||
status: string | undefined;
|
status: string | undefined;
|
||||||
area?: string;
|
area?: string;
|
||||||
localized_platform: string;
|
localized_platform: string;
|
||||||
|
domain: string;
|
||||||
label_entries: LabelRegistryEntry[];
|
label_entries: LabelRegistryEntry[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,6 +263,13 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
width: "20%",
|
width: "20%",
|
||||||
},
|
},
|
||||||
|
domain: {
|
||||||
|
title: localize("ui.panel.config.entities.picker.headers.domain"),
|
||||||
|
sortable: true,
|
||||||
|
hidden: true,
|
||||||
|
filterable: true,
|
||||||
|
groupable: true,
|
||||||
|
},
|
||||||
area: {
|
area: {
|
||||||
title: localize("ui.panel.config.entities.picker.headers.area"),
|
title: localize("ui.panel.config.entities.picker.headers.area"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
@ -467,9 +476,9 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
),
|
),
|
||||||
unavailable,
|
unavailable,
|
||||||
restored,
|
restored,
|
||||||
localized_platform:
|
localized_platform: domainToName(localize, entry.platform),
|
||||||
localize(`component.${entry.platform}.title`) || entry.platform,
|
|
||||||
area: area ? area.name : "—",
|
area: area ? area.name : "—",
|
||||||
|
domain: domainToName(localize, computeDomain(entry.entity_id)),
|
||||||
status: restored
|
status: restored
|
||||||
? localize("ui.panel.config.entities.picker.status.restored")
|
? localize("ui.panel.config.entities.picker.status.restored")
|
||||||
: unavailable
|
: unavailable
|
||||||
|
@ -4052,7 +4052,8 @@
|
|||||||
"integration": "Integration",
|
"integration": "Integration",
|
||||||
"area": "Area",
|
"area": "Area",
|
||||||
"disabled_by": "Disabled by",
|
"disabled_by": "Disabled by",
|
||||||
"status": "Status"
|
"status": "Status",
|
||||||
|
"domain": "Domain"
|
||||||
},
|
},
|
||||||
"selected": "{number} selected",
|
"selected": "{number} selected",
|
||||||
"enable_selected": {
|
"enable_selected": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user