From f75f4b97331c4f10ca9f218e282173935ca00c3d Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 8 Jan 2025 06:08:16 -0800 Subject: [PATCH] Retain event data when moving/resizing schedule item (#23621) * Retain event data when moving/resizing schedule item * update from suggestion --- src/panels/config/helpers/forms/ha-schedule-form.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/panels/config/helpers/forms/ha-schedule-form.ts b/src/panels/config/helpers/forms/ha-schedule-form.ts index 3854c9e742..9fe2ef5c7b 100644 --- a/src/panels/config/helpers/forms/ha-schedule-form.ts +++ b/src/panels/config/helpers/forms/ha-schedule-form.ts @@ -296,6 +296,7 @@ class HaScheduleForm extends LitElement { const endFormatted = formatTime24h(end, this.hass.locale, this.hass.config); newValue[day][index] = { + ...newValue[day][index], from: value.from, to: !isSameDay(start, end) || endFormatted === "0:00" @@ -322,6 +323,7 @@ class HaScheduleForm extends LitElement { const endFormatted = formatTime24h(end, this.hass.locale, this.hass.config); const event = { + ...newValue[day][index], from: formatTime24h(start, this.hass.locale, this.hass.config), to: !isSameDay(start, end) || endFormatted === "0:00"