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