mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add message "no entries" to analog/temperature/custom/sccheduler
This commit is contained in:
@@ -142,6 +142,10 @@ bool WebSchedulerService::get_value_info(JsonObject & output, const char * cmd)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (scheduleItems->size() == 0) {
|
||||
output["message"] = "no entries";
|
||||
return true;
|
||||
}
|
||||
if (strlen(cmd) == 0 || Helpers::toLower(cmd) == F_(values) || Helpers::toLower(cmd) == F_(info)) {
|
||||
// list all names
|
||||
for (const ScheduleItem & scheduleItem : *scheduleItems) {
|
||||
@@ -158,10 +162,6 @@ bool WebSchedulerService::get_value_info(JsonObject & output, const char * cmd)
|
||||
}
|
||||
return (output.size() > 0);
|
||||
}
|
||||
if (scheduleItems->size() == 0) {
|
||||
output["message"] = "no schedules";
|
||||
return false;
|
||||
}
|
||||
char command_s[30];
|
||||
strlcpy(command_s, cmd, sizeof(command_s));
|
||||
char * attribute_s = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user