From 592e93be2a7e68f4cbe1d10cd00d58941bfde8e2 Mon Sep 17 00:00:00 2001 From: CrazyVito11 <31567466+CrazyVito11@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:40:37 +0100 Subject: [PATCH] Implemented suggestion from PR feedback in ha-counter-form --- src/panels/config/helpers/forms/ha-counter-form.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/config/helpers/forms/ha-counter-form.ts b/src/panels/config/helpers/forms/ha-counter-form.ts index ea1462376280..2b20ce2fa0e6 100644 --- a/src/panels/config/helpers/forms/ha-counter-form.ts +++ b/src/panels/config/helpers/forms/ha-counter-form.ts @@ -176,8 +176,8 @@ class HaCounterForm extends LitElement { let value = ev.detail?.value ?? target.value; if (target.type === "number") { - if (target.value !== "") { - value = Number(target.value); + if (value !== "") { + value = Number(value); } else { value = undefined; }