Public Access
15 lines
637 B
C
15 lines
637 B
C
#pragma once
|
|||
|
|
|
||
|
|
#include <ArduinoJson.h>
|
||
|
|
|
||
|
|
#include "logic/page.h"
|
||
|
|
|
||
|
|
// Dynamic pages (logic/page.h) as JSON for the web UI:
|
||
|
|
// {slots: [{start: "08:00", bitmap: "Pikachu"}],
|
||
|
|
// elements: [{type: "clock"|"date"|"ha"|"text", x, y, align: "left"|"center"|"right",
|
||
|
|
// overlay: "top"|"box"|"invert", font, format, language: "nl"|"en",
|
||
|
|
// decimals (-1 = as received), text, suffix, entity, attribute}]}
|
||
|
|
|
||
|
|
void pageToJson(const DynamicPage &page, JsonObject out);
|
||
|
|
// Returns nullptr or a message for the user. Validates the page (validatePage()).
|
||
|
|
const char *pageFromJson(JsonVariantConst in, DynamicPage &page);
|