diff --git a/src/test/test.cpp b/src/test/test.cpp index 0bb5c8754..b28023ec3 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -280,6 +280,21 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const ok = true; } + if (command == "custom_entities") { + shell.printfln("custom entities..."); + run_test("general"); + +#ifdef EMSESP_STANDALONE + AsyncWebServerRequest request; + request.method(HTTP_GET); + request.url("/api/custom"); + request.url("/api/custom/boiler_flowtemp"); + request.url("/api/custom/boiler_flowtemp2"); + EMSESP::webAPIService.webAPIService_get(&request); +#endif + ok = true; + } + if (command == "coldshot") { shell.printfln("Testing coldshot..."); run_test("general"); @@ -734,7 +749,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const if (emsdevice->unique_id() == 1) { // thermostat std::string a = "00hc1/seltemp|new name>5<52"; - emsdevice->setCustomEntity(a); + emsdevice->setCustomizationEntity(a); break; } } @@ -760,7 +775,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const for (const auto & emsdevice : EMSESP::emsdevices) { if (emsdevice->unique_id() == 1) { // boiler std::string a = "07wwseltemp"; - emsdevice->setCustomEntity(a); + emsdevice->setCustomizationEntity(a); break; } } diff --git a/src/test/test.h b/src/test/test.h index b0c495a8e..24c316250 100644 --- a/src/test/test.h +++ b/src/test/test.h @@ -54,7 +54,9 @@ namespace emsesp { // #define EMSESP_DEBUG_DEFAULT "custom" // #define EMSESP_DEBUG_DEFAULT "entity_dump" // #define EMSESP_DEBUG_DEFAULT "memory" -#define EMSESP_DEBUG_DEFAULT "coldshot" +// #define EMSESP_DEBUG_DEFAULT "coldshot" +#define EMSESP_DEBUG_DEFAULT "custom_entities" + class Test { public: