diff --git a/src/web/WebCustomEntityService.cpp b/src/web/WebCustomEntityService.cpp index 653c8a74e..36fb5ac9c 100644 --- a/src/web/WebCustomEntityService.cpp +++ b/src/web/WebCustomEntityService.cpp @@ -247,11 +247,13 @@ bool WebCustomEntityService::get_value_info(JsonObject & output, const char * cm } return true; } + // if no entries, return empty json // https://github.com/emsesp/EMS-ESP32/issues/1297 if (customEntityItems->size() == 0) { return true; } + if (strlen(cmd) == 0 || Helpers::toLower(cmd) == F_(values) || Helpers::toLower(cmd) == F_(info)) { // list all names for (const CustomEntityItem & entity : *customEntityItems) {