From 5a6d6dc7d351ed13430424f4e51e668718ff537c Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 9 Oct 2023 05:41:27 -0700 Subject: [PATCH] Fix period selector in statistic card (#18131) --- .../editor/config-elements/hui-statistic-card-editor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/lovelace/editor/config-elements/hui-statistic-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-statistic-card-editor.ts index 267b4745f3..0287be3862 100644 --- a/src/panels/lovelace/editor/config-elements/hui-statistic-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-statistic-card-editor.ts @@ -196,7 +196,7 @@ export class HuiStatisticCardEditor } private async _valueChanged(ev: CustomEvent) { - const config = ev.detail.value as StatisticCardConfig; + const config = { ...ev.detail.value } as StatisticCardConfig; Object.keys(config).forEach((k) => config[k] === "" && delete config[k]); if (typeof config.period === "string") {