mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
add test for hpmode over mqtt
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user