From 072f70b49f2f9b95ddd6f6f5b916d2079c633ca5 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 30 Mar 2026 14:12:04 +0200 Subject: [PATCH] Numeric threshold selector: remove duplicate uom from input (#51275) --- src/components/ha-selector/ha-selector-numeric-threshold.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ha-selector/ha-selector-numeric-threshold.ts b/src/components/ha-selector/ha-selector-numeric-threshold.ts index e34d3680fd..d439f5d944 100644 --- a/src/components/ha-selector/ha-selector-numeric-threshold.ts +++ b/src/components/ha-selector/ha-selector-numeric-threshold.ts @@ -287,7 +287,9 @@ export class HaNumericThresholdSelector extends LitElement { const numberSelector = { number: { ...this.selector.numeric_threshold?.number, - ...(effectiveUnit ? { unit_of_measurement: effectiveUnit } : {}), + ...(!showUnit && effectiveUnit + ? { unit_of_measurement: effectiveUnit } + : {}), }, }; const entitySelector = {