mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix #1565, use String for output a single api_data
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user