From 30f491b434572973de7281e8bcdcc1658224a1c2 Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 30 Sep 2024 10:08:50 +0200 Subject: [PATCH] fixes to https://github.com/emsesp/EMS-ESP32/pull/2066 --- src/web/WebStatusService.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web/WebStatusService.cpp b/src/web/WebStatusService.cpp index f630b3252..1cf9f7cdb 100644 --- a/src/web/WebStatusService.cpp +++ b/src/web/WebStatusService.cpp @@ -209,9 +209,8 @@ bool WebStatusService::checkUpgrade(JsonObject root, std::string & latest_versio // action = allvalues // output all the devices and the values void WebStatusService::allvalues(JsonObject output) { - JsonDocument doc; - JsonObject device_output; - auto value = F_(values); + JsonObject device_output; + auto value = F_(values); // EMS-Device Entities for (const auto & emsdevice : EMSESP::emsdevices) { @@ -256,6 +255,7 @@ bool WebStatusService::exportData(JsonObject root, std::string & type) { } else if (type == "entities") { System::extractSettings(EMSESP_CUSTOMENTITY_FILE, "Entities", root); } else if (type == "allvalues") { + root.clear(); // don't need the "type" key allvalues(root); } else { return false;