mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
add test for min/max
This commit is contained in:
@@ -601,6 +601,36 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
|||||||
EMSESP::system_.healthcheck(n);
|
EMSESP::system_.healthcheck(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (command == "custom") {
|
||||||
|
shell.printfln(F("Testing custom entities"));
|
||||||
|
|
||||||
|
Mqtt::ha_enabled(true);
|
||||||
|
Mqtt::send_response(false);
|
||||||
|
|
||||||
|
run_test("thermostat");
|
||||||
|
|
||||||
|
// shell.invoke_command("call thermostat seltemp");
|
||||||
|
// shell.invoke_command("call system publish");
|
||||||
|
|
||||||
|
// toggle mode
|
||||||
|
for (const auto & emsdevice : EMSESP::emsdevices) {
|
||||||
|
Serial.print("Custom: ");
|
||||||
|
Serial.print(emsdevice->device_type_name().c_str());
|
||||||
|
Serial.print(" uniqueid=");
|
||||||
|
Serial.println(emsdevice->unique_id());
|
||||||
|
|
||||||
|
if (emsdevice->unique_id() == 1) { // thermostat
|
||||||
|
std::string a = "00hc1/seltemp|new name>5<52";
|
||||||
|
emsdevice->setCustomEntity(a);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shell.invoke_command("call thermostat seltemp");
|
||||||
|
shell.invoke_command("call system publish");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (command == "masked") {
|
if (command == "masked") {
|
||||||
shell.printfln("Testing masked entities");
|
shell.printfln("Testing masked entities");
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ namespace emsesp {
|
|||||||
// #define EMSESP_DEBUG_DEFAULT "api_values"
|
// #define EMSESP_DEBUG_DEFAULT "api_values"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "mqtt_post"
|
// #define EMSESP_DEBUG_DEFAULT "mqtt_post"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "api_wwmode"
|
// #define EMSESP_DEBUG_DEFAULT "api_wwmode"
|
||||||
|
// #define EMSESP_DEBUG_DEFAULT "custom"
|
||||||
|
|
||||||
class Test {
|
class Test {
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user