Add unique_id to entity registry (#13886)
This commit is contained in:
parent
01fd2787be
commit
cc76a6c5ed
|
@ -68,6 +68,7 @@ class HaDemo extends HomeAssistantAppEl {
|
|||
hidden_by: null,
|
||||
entity_category: null,
|
||||
has_entity_name: false,
|
||||
unique_id: "co2_intensity",
|
||||
},
|
||||
{
|
||||
config_entry_id: "co2signal",
|
||||
|
@ -82,6 +83,7 @@ class HaDemo extends HomeAssistantAppEl {
|
|||
hidden_by: null,
|
||||
entity_category: null,
|
||||
has_entity_name: false,
|
||||
unique_id: "grid_fossil_fuel_percentage",
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
|
@ -196,6 +196,7 @@ const createEntityRegistryEntries = (
|
|||
icon: null,
|
||||
platform: "updater",
|
||||
has_entity_name: false,
|
||||
unique_id: "updater",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ export interface EntityRegistryEntry {
|
|||
entity_category: "config" | "diagnostic" | null;
|
||||
has_entity_name: boolean;
|
||||
original_name?: string;
|
||||
unique_id: string;
|
||||
}
|
||||
|
||||
export interface ExtEntityRegistryEntry extends EntityRegistryEntry {
|
||||
unique_id: string;
|
||||
capabilities: Record<string, unknown>;
|
||||
original_icon?: string;
|
||||
device_class?: string;
|
||||
|
|
|
@ -68,10 +68,12 @@ import type { HomeAssistant, Route } from "../../../types";
|
|||
import { configSections } from "../ha-panel-config";
|
||||
import "../integrations/ha-integration-overflow-menu";
|
||||
|
||||
export interface StateEntity extends Omit<EntityRegistryEntry, "id"> {
|
||||
export interface StateEntity
|
||||
extends Omit<EntityRegistryEntry, "id" | "unique_id"> {
|
||||
readonly?: boolean;
|
||||
selectable?: boolean;
|
||||
id?: string;
|
||||
unique_id?: string;
|
||||
}
|
||||
|
||||
export interface EntityRow extends StateEntity {
|
||||
|
|
Loading…
Reference in New Issue