Skip to content

Commit

Permalink
Retain event data when moving/resizing schedule item (#23621)
Browse files Browse the repository at this point in the history
* Retain event data when moving/resizing schedule item

* update from suggestion
  • Loading branch information
karwosts authored Jan 8, 2025
1 parent b1acf9a commit f75f4b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/panels/config/helpers/forms/ha-schedule-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit f75f4b9

Please sign in to comment.