diff --git a/gallery/src/pages/components/ha-selector.ts b/gallery/src/pages/components/ha-selector.ts
index 3824d9bb18..0fb6d83263 100644
--- a/gallery/src/pages/components/ha-selector.ts
+++ b/gallery/src/pages/components/ha-selector.ts
@@ -161,12 +161,14 @@ const LABELS: LabelRegistryEntry[] = [
name: "Energy",
icon: null,
color: "yellow",
+ description: null,
},
{
label_id: "entertainment",
name: "Entertainment",
icon: "mdi:popcorn",
color: "blue",
+ description: null,
},
];
diff --git a/src/components/ha-label-picker.ts b/src/components/ha-label-picker.ts
index 289b7ba269..fd0239d176 100644
--- a/src/components/ha-label-picker.ts
+++ b/src/components/ha-label-picker.ts
@@ -302,6 +302,7 @@ export class HaLabelPicker extends SubscribeMixin(LitElement) {
name: this.hass.localize("ui.components.label-picker.no_match"),
icon: null,
color: null,
+ description: null,
},
];
}
@@ -315,6 +316,7 @@ export class HaLabelPicker extends SubscribeMixin(LitElement) {
name: this.hass.localize("ui.components.label-picker.add_new"),
icon: "mdi:plus",
color: null,
+ description: null,
},
];
}
diff --git a/src/data/label_registry.ts b/src/data/label_registry.ts
index ca3512cd93..cc6b318354 100644
--- a/src/data/label_registry.ts
+++ b/src/data/label_registry.ts
@@ -9,12 +9,14 @@ export interface LabelRegistryEntry {
name: string;
icon: string | null;
color: string | null;
+ description: string | null;
}
export interface LabelRegistryEntryMutableParams {
name: string;
icon?: string | null;
color?: string | null;
+ description?: string | null;
}
export const fetchLabelRegistry = (conn: Connection) =>
diff --git a/src/panels/config/labels/dialog-label-detail.ts b/src/panels/config/labels/dialog-label-detail.ts
index b0e0638627..bffc5d79c0 100644
--- a/src/panels/config/labels/dialog-label-detail.ts
+++ b/src/panels/config/labels/dialog-label-detail.ts
@@ -7,6 +7,7 @@ import { createCloseHeading } from "../../../components/ha-dialog";
import "../../../components/ha-formfield";
import "../../../components/ha-switch";
import "../../../components/ha-textfield";
+import "../../../components/ha-textarea";
import "../../../components/ha-icon-picker";
import "../../../components/ha-color-picker";
import { HassDialog } from "../../../dialogs/make-dialog-manager";
@@ -31,6 +32,8 @@ class DialogLabelDetail
@state() private _color!: string;
+ @state() private _description!: string;
+
@state() private _error?: string;
@state() private _params?: LabelDetailDialogParams;
@@ -44,10 +47,12 @@ class DialogLabelDetail
this._name = this._params.entry.name || "";
this._icon = this._params.entry.icon || "";
this._color = this._params.entry.color || "";
+ this._description = this._params.entry.description || "";
} else {
this._name = this._params.suggestedName || "";
this._icon = "";
this._color = "";
+ this._description = "";
}
document.body.addEventListener("keydown", this._handleKeyPress);
}
@@ -118,6 +123,14 @@ class DialogLabelDetail
"ui.panel.config.labels.detail.color"
)}
>
+