fix #1565, use String for output a single api_data

This commit is contained in:
MichaelDvP
2024-01-20 10:48:16 +01:00
parent cc83dab97b
commit 4d1a428acf
7 changed files with 9 additions and 17 deletions

View File

@@ -177,7 +177,6 @@ bool WebSchedulerService::get_value_info(JsonObject output, const char * cmd) {
attribute_s = breakp + 1;
}
JsonVariant data;
for (const ScheduleItem & scheduleItem : *scheduleItems) {
if (Helpers::toLower(scheduleItem.name) == Helpers::toLower(command_s)) {
output["name"] = scheduleItem.name;
@@ -199,7 +198,7 @@ bool WebSchedulerService::get_value_info(JsonObject output, const char * cmd) {
}
if (attribute_s && output.containsKey(attribute_s)) {
data = output[attribute_s];
String data = output[attribute_s].as<String>();
output.clear();
output["api_data"] = data;
}