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}
@@ -215,6 +217,7 @@ class HuiTargetTemperatureTileFeature
.formatOptions=${options}
.target=${"low"}
.value=${this._targetTemperature.low}
+ .unit=${this.hass.config.unit_system.temperature}
.min=${this._min}
.max=${Math.min(
this._max,
@@ -230,12 +233,14 @@ class HuiTargetTemperatureTileFeature
"--control-number-buttons-focus-color": stateColor,
})}
.disabled=${this.stateObj!.state === UNAVAILABLE}
+ .locale=${this.hass.locale}
>
@@ -261,6 +267,7 @@ class HuiTargetTemperatureTileFeature
diff --git a/yarn.lock b/yarn.lock
index 720c2befb641..cb6ee5e7b4f2 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6616,16 +6616,7 @@ __metadata:
languageName: node
linkType: hard
-"clean-css@npm:^4.2.1, clean-css@npm:^4.2.3":
- version: 4.2.4
- resolution: "clean-css@npm:4.2.4"
- dependencies:
- source-map: "npm:~0.6.0"
- checksum: 4f64dbebfa29feb79be25d6f91239239179adc805c6d7442e2c728970ca23a75b5f238118477b4b78553b89e50f14a64fe35145ecc86b6badf971883c4ad2ffe
- languageName: node
- linkType: hard
-
-"clean-css@npm:~5.3.2":
+"clean-css@npm:5.3.2":
version: 5.3.2
resolution: "clean-css@npm:5.3.2"
dependencies: