add test for hpmode over mqtt

This commit is contained in:
proddy
2025-06-04 08:35:53 +02:00
parent 58011700fe
commit 0e9283af5c
2 changed files with 23 additions and 1 deletions

View File

@@ -921,6 +921,27 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
ok = true;
}
if (command == "hpmode") {
shell.printfln("Testing MQTT with hpmode...");
Mqtt::ha_enabled(false);
Mqtt::enabled(true);
Mqtt::entity_format(Mqtt::entityFormat::SINGLE_LONG); // SINGLE_LONG, SINGLE_SHORT, MULTI_SHORT
System::test_set_all_active(true); // include all entities and give them fake values
add_device(10, 158);
// EMSESP::mqtt_.incoming("ems-esp/thermostat/hc1/hpmode", "cooling");
EMSESP::mqtt_.incoming("ems-esp/thermostat/hc1/hpmode", "heating & cooling");
EMSESP::publish_all(true);
Mqtt::resubscribe();
Mqtt::show_mqtt(shell); // show queue
ok = true;
}
if (command == "healthcheck") {
// n=1 = EMSESP::system_.HEALTHCHECK_NO_BUS
// n=2 = EMSESP::system_.HEALTHCHECK_NO_NETWORK

View File

@@ -56,11 +56,12 @@ namespace emsesp {
// #define EMSESP_DEBUG_DEFAULT "telegram_dump"
// #define EMSESP_DEBUG_DEFAULT "memory"
// #define EMSESP_DEBUG_DEFAULT "coldshot"
#define EMSESP_DEBUG_DEFAULT "custom"
// #define EMSESP_DEBUG_DEFAULT "custom"
// #define EMSESP_DEBUG_DEFAULT "scheduler"
// #define EMSESP_DEBUG_DEFAULT "heat_exchange"
// #define EMSESP_DEBUG_DEFAULT "ls"
// #define EMSESP_DEBUG_DEFAULT "upload"
#define EMSESP_DEBUG_DEFAULT "hpmode"
#ifndef EMSESP_DEBUG_DEFAULT
#define EMSESP_DEBUG_DEFAULT "general"