Public Access
Add a page schedule with rotation, Home Assistant trigger rules and a Stopwatch tab
- Schedule: daily blocks from a start time, each with up to 6 rotating pages or bitmaps (own duration), switching with the effect or instantly. A manual pick (Show tab, HA Mode) lasts until the next block; Back to schedule ends it. - Rules: an HA state (=, is not, above, below) shows a page while true, adds it to the rotation while true, or shows it for N seconds when it becomes true. Each rule is polled at its own interval, with a 60 s back-off on errors. - PageSelector (pure logic, tested) decides the shown page; schedule stored in NVS; HA sensor Shown page and button Back to schedule. - Web UI: Schedule and Stopwatch tabs, bitmaps used by pages or rules in their own subsection, schedule in export/import. Version 2.6.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
47ef65ee7d
commit
93b9bec69a
25 files changed
+1217
-50
No files matched your search
+15
-1
@@ -9,6 +9,7 @@
|
||||
#include "logic/display_controller.h"
|
||||
#include "logic/local_time.h"
|
||||
#include "logic/page.h"
|
||||
#include "logic/page_schedule.h"
|
||||
#include "logic/settings.h"
|
||||
#include "nano_link/nano_link.h"
|
||||
|
||||
@@ -25,8 +26,21 @@ void appLoadSettings();
|
||||
// restart_needed when the change only works after a restart (Home Assistant MQTT).
|
||||
const char *appSaveSettings(const Settings &settings, bool &restart_needed);
|
||||
|
||||
// The page shown during the day: a dynamic page or a bitmap (stored in the settings)
|
||||
// The chosen page (settings): a dynamic page or a bitmap. With a schedule it is shown until
|
||||
// the next block starts (a manual pick), without one all the time.
|
||||
const char *appSelectPage(const char *name);
|
||||
|
||||
// The schedule and trigger rules (validated, stored, used right away)
|
||||
const char *appSaveSchedule(const PageSchedule &schedule);
|
||||
const PageSchedule &appSchedule();
|
||||
// Ends a manual pick: the schedule decides again
|
||||
void appBackToSchedule();
|
||||
// The page or bitmap shown now, and why (e.g. "schedule", "chosen, until 17:00")
|
||||
const char *appShownPage();
|
||||
void appShowStatus(char *out, size_t size);
|
||||
// Decides the shown page (rules, schedule, chosen page); call every loop() before the
|
||||
// display controller
|
||||
void appPageLoop(bool time_valid, const LocalTime &time);
|
||||
// Left on the dots when the display switches off: OFF_PAGE_BLANK or a bitmap name
|
||||
const char *appSelectOffPage(const char *name);
|
||||
|
||||
|
||||
Reference in new issue
Block a user