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

@@ -374,13 +374,12 @@ std::string WebCommandService::get_metrics_prometheus() {
void WebCommandService::get_value_json(JsonObject output, const CommandItem & ci) {
output["name"] = (const char *)ci.name;
// output["fullname"] = (const char *)ci.name;
// output["type"] = "command";
output["type"] = "command";
output["command"] = ci.cmd;
output["value"] = ci.value;
// bool hasName = ci.name[0] != '\0';
// output["readable"] = hasName;
// output["writeable"] = hasName;
// output["visible"] = hasName;
output["readable"] = true;
output["writeable"] = true;
output["visible"] = true;
}
void WebCommandService::publish(const bool force) {