Skip to content

Add weekly heating schedule with per-slot control#231

Open
reloadman wants to merge 3 commits intoLaxilef:masterfrom
reloadman:heating_schedule
Open

Add weekly heating schedule with per-slot control#231
reloadman wants to merge 3 commits intoLaxilef:masterfrom
reloadman:heating_schedule

Conversation

@reloadman
Copy link
Copy Markdown

Summary

  • Added a top-level heatingSchedule settings model with:
    • 7 days, 4 intervals per day
    • 15-minute time steps
    • per-interval enabled flag
    • actions: off, on, set target temperature
  • Implemented runtime schedule execution in MainTask:
    • selects the active interval by local time
    • skips disabled intervals
    • supports previous-day carry-over for overnight behavior
    • applies manual override (Dashboard/MQTT) until the next active interval
  • Updated localization for all supported languages (EN/RU/NL/IT/CN) for new schedule UI text.
  • Updated API serialization/deserialization:
    • new top-level heatingSchedule JSON format
    • backward compatibility for legacy heating.schedule
  • Increased settings payload limits for API/MQTT to support larger schedule JSON.
Screenshot 2026-03-31 at 15 31 20

Why

This adds native timer-based heating automation with flexible per-slot behavior

Test plan

  • Configure NTP server + timezone, save settings, verify local time is applied correctly.
  • Enable schedule and set a slot (e.g. 15:30 -> On), verify heating switches on at the exact slot time.
  • Set a slot to Off, verify heating is disabled at slot time.
  • Set a slot to Target, verify heating is enabled and target temperature is applied.
  • Disable a slot, verify it is skipped.
  • Make a manual Dashboard/MQTT change during an active slot, verify override persists until the next active slot.
  • Edit with All days, then switch to individual days and verify values are propagated correctly.

@Laxilef
Copy link
Copy Markdown
Owner

Laxilef commented Apr 6, 2026

Hi @reloadman,

Thank you for your contribution! I need some time to study this.
One question: how is this better than the schedules in Home Assistant?

P.S. We already use NTP to update the date/time on the ESP:

OTGateway/src/Settings.h

Lines 39 to 42 in 4775d36

struct {
char server[49] = "pool.ntp.org";
char timezone[49] = "UTC0";
} ntp;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants