device value info for command attributes and GET requests

This commit is contained in:
MichaelDvP
2026-07-11 15:27:33 +02:00
parent eef1367ed2
commit 1cd3cb854e
2 changed files with 5 additions and 6 deletions

View File

@@ -382,7 +382,7 @@ uint8_t Command::call(const uint8_t device_type, const char * command, const cha
// rather than returning its definition, so skip the value-info lookup and fall through
// to the registered command function. The list keywords above are still handled.
bool is_named_command = (device_type == EMSdevice::DeviceType::COMMAND) && strcmp(cmd, F_(info)) && strcmp(cmd, F_(values)) && strcmp(cmd, F_(entities))
&& strcmp(cmd, F_(metrics));
&& strcmp(cmd, F_(metrics)) && !strchr(cmd, '/') && is_admin;
if (!is_named_command && EMSESP::get_device_value_info(output, cmd, id, device_type)) { // entity = cmd
LOG_DEBUG("Fetched device entity/attributes for %s/%s (id=%d)", dname, cmd, id);
return CommandRet::OK;