Public Access
Rules can leave a manual pick alone, Clock is an editable page, fix HA attributes
- Rules: "also over a page chosen by hand" (on by default); off, a rule waits until the manual pick ends. Schedule store version 3, version 2 records are read with the option on. - The Clock page is stored at boot from the built-in one and can be edited; Reset (deleting it) brings back the original. - Home Assistant attributes were never found: ArduinoJson 7.4 takes a char array key as a literal of its full array length. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ab001e5d18
commit
51b8d87e86
37 files changed
+134
-42
No files matched your search
@@ -99,7 +99,7 @@ static const char *fetch(const Request &r, char *value, size_t value_size)
|
||||
|
||||
JsonDocument filter;
|
||||
if (r.attribute[0])
|
||||
filter["attributes"][r.attribute] = true;
|
||||
filter["attributes"][(const char *)r.attribute] = true; // a char array would be taken as a literal of 32 characters
|
||||
else
|
||||
filter["state"] = true;
|
||||
JsonDocument doc;
|
||||
@@ -110,7 +110,7 @@ static const char *fetch(const Request &r, char *value, size_t value_size)
|
||||
|
||||
JsonVariantConst v = doc["state"];
|
||||
if (r.attribute[0])
|
||||
v = doc["attributes"][r.attribute];
|
||||
v = doc["attributes"][(const char *)r.attribute];
|
||||
if (v.isNull())
|
||||
return "Unknown attribute";
|
||||
String text;
|
||||
|
||||
@@ -97,7 +97,7 @@ static std::vector<String> pageNames()
|
||||
{
|
||||
std::vector<String> names, stored;
|
||||
for (const PageInfo &p : listPages())
|
||||
(p.builtin ? names : stored).push_back(p.name);
|
||||
(p.builtin || p.original ? names : stored).push_back(p.name);
|
||||
std::sort(stored.begin(), stored.end(), lessName);
|
||||
names.insert(names.end(), stored.begin(), stored.end());
|
||||
std::vector<String> bitmaps = bitmapNames();
|
||||
|
||||
Reference in new issue
Block a user