diff --git a/gallery/src/pages/components/ha-control-number-buttons.ts b/gallery/src/pages/components/ha-control-number-buttons.ts index 8afa9ee487a0..d8770dd4a1b0 100644 --- a/gallery/src/pages/components/ha-control-number-buttons.ts +++ b/gallery/src/pages/components/ha-control-number-buttons.ts @@ -11,6 +11,7 @@ const buttons: { min?: number; max?: number; step?: number; + unit?: string; class?: string; }[] = [ { @@ -29,6 +30,11 @@ const buttons: { label: "Custom", class: "custom", }, + { + id: "unit", + label: "With unit", + unit: "m", + }, ]; @customElement("demo-components-ha-control-number-buttons") @@ -50,6 +56,7 @@ export class DemoHarControlNumberButtons extends LitElement {
Config: ${JSON.stringify(config)}
- ${displayedValue} + ${value} ${unit ? html`${unit}` : nothing}