1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 15:52:20 +01:00

webserver needs as well

This commit is contained in:
J. Nick Koston
2025-07-14 10:28:10 -10:00
parent 4de36ffeb4
commit 40d436746c

View File

@@ -1322,6 +1322,7 @@ std::string WebServer::climate_all_json_generator(WebServer *web_server, void *s
return web_server->climate_json((climate::Climate *) (source), DETAIL_ALL);
}
std::string WebServer::climate_json(climate::Climate *obj, JsonDetail start_config) {
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson
return json::build_json([this, obj, start_config](JsonObject root) {
set_json_id(root, obj, "climate-" + obj->get_object_id(), start_config);
const auto traits = obj->get_traits();