Skip to content

Commit

Permalink
update test for 196
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Nov 15, 2021
1 parent 822f554 commit cde3b75
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
30 changes: 29 additions & 1 deletion src/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,38 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd) {
shell.invoke_command("call boiler entities");
}

if (command == "dv") {
shell.printfln(F("Testing device value rendering"));

Mqtt::ha_enabled(true);
// Mqtt::ha_enabled(false);

Mqtt::nested_format(1);
Mqtt::send_response(false);

run_test("boiler");
run_test("thermostat");

// shell.invoke_command("show");

// change a value to null/bogus/dormant
// homeassistant/sensor/ems-esp/boiler_wwseltemp/config
shell.invoke_command("call boiler wwseltemp");
shell.invoke_command("call system publish");

// Boiler -> Me, UBAParameterWW(0x33)
// wwseltemp = goes from 52 degrees (0x34) to void (0xFF)
uart_telegram({0x08, 0x0B, 0x33, 0x00, 0x08, 0xFF, 0xFF, 0xFB, 0x00, 0x28, 0x00, 0x00, 0x46, 0x00, 0xFF, 0xFF, 0x00});

shell.invoke_command("call boiler wwseltemp");
shell.invoke_command("call system publish");

// shell.invoke_command("show mqtt");
}

if (command == "api") {
shell.printfln(F("Testing API with MQTT and REST, standalone"));


Mqtt::ha_enabled(true);
// Mqtt::ha_enabled(false);

Expand Down
4 changes: 3 additions & 1 deletion src/test/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ namespace emsesp {
// #define EMSESP_DEBUG_DEFAULT "shower_alert"
// #define EMSESP_DEBUG_DEFAULT "310"
// #define EMSESP_DEBUG_DEFAULT "render"
#define EMSESP_DEBUG_DEFAULT "api"
// #define EMSESP_DEBUG_DEFAULT "api"
// #define EMSESP_DEBUG_DEFAULT "crash"
#define EMSESP_DEBUG_DEFAULT "dv"


class Test {
public:
Expand Down

0 comments on commit cde3b75

Please sign in to comment.