mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
handle attribute_s like we did with the other device classes
This commit is contained in:
@@ -196,15 +196,19 @@ bool WebSchedulerService::get_value_info(JsonObject output, const char * cmd) {
|
|||||||
output["readable"] = true;
|
output["readable"] = true;
|
||||||
output["writeable"] = true;
|
output["writeable"] = true;
|
||||||
output["visible"] = true;
|
output["visible"] = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attribute_s && output.containsKey(attribute_s)) {
|
if (attribute_s) {
|
||||||
|
if (output.containsKey(attribute_s)) {
|
||||||
std::string data = output[attribute_s].as<std::string>();
|
std::string data = output[attribute_s].as<std::string>();
|
||||||
output.clear();
|
output.clear();
|
||||||
output["api_data"] = data; // always as a string
|
output["api_data"] = data; // always as a string
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return EMSESP::return_not_found(output, attribute_s, command_s); // not found
|
||||||
|
}
|
||||||
|
|
||||||
if (output.size()) {
|
if (output.size()) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user