formatting

This commit is contained in:
Proddy
2023-11-12 15:58:35 +01:00
parent 101159b9f6
commit 2079b7e602

View File

@@ -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) {