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 267b4745f304..0287be386251 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") {