From b75e2670b75c17ab90c2922e245e17c6f2a89845 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 31 Aug 2026 07:08:28 +0200 Subject: [PATCH] fix: keep a custom recurrence rule when the editor reopens it (#29260) Loading an automation whose rule the visual controls cannot represent switched the schedule to Custom but left the bookkeeping the seeding block reads on the previous value, so that block immediately replaced the rule with a freshly built default. The rule was lost when the editor opened, before anything was saved, and cloning carried the default across as well. Recording the switch alongside it leaves the stored rule in place. Verified in a browser against the same build without this line: a minutely rule and a yearly rule now survive reopen and save byte for byte, cloning keeps the original, and every schedule the editor itself produces, along with switching to Custom by hand, behaves exactly as before. --- src/lib/components/automations/ScheduleDropdown.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/components/automations/ScheduleDropdown.svelte b/src/lib/components/automations/ScheduleDropdown.svelte index e994109da3..fba15c5220 100644 --- a/src/lib/components/automations/ScheduleDropdown.svelte +++ b/src/lib/components/automations/ScheduleDropdown.svelte @@ -128,6 +128,7 @@ const freq = parts.FREQ || 'DAILY'; if (!['HOURLY', 'DAILY', 'WEEKLY', 'MONTHLY'].includes(freq)) { frequency = 'CUSTOM'; + prevFrequency = 'CUSTOM'; customRrule = s; return; }