Skip to content

Commit

Permalink
extended test for ha and entities command
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 19, 2021
1 parent 079a40c commit b214d7a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions src/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd) {
shell.printfln("Float test from %f to %s", test_float, result);

uint16_t temp;
double doub;
float doub;
temp = 0x0201; // decimal 513
doub = Helpers::round2(temp, 10); // divide by 10
shell.printfln("Round test from x%02X to %d to %f", temp, temp, doub);
Expand Down Expand Up @@ -463,6 +463,11 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd) {

shell.invoke_command("call system publish");
shell.invoke_command("show mqtt");

shell.invoke_command("call boiler fanwork");
shell.invoke_command("call thermostat seltemp"); // sensor.thermostat_hc1_selected_room_temperature
shell.invoke_command("call thermostat entities");
shell.invoke_command("call boiler entities");
}

if (command == "mqtt_nested") {
Expand Down Expand Up @@ -808,8 +813,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd) {

// fit it up, to its limit of the Json buffer (which is about 169 records)
for (uint8_t i = 0; i < 200; i++) {
snprintf_P(key, 7, "key%03d", i);
snprintf_P(value, 7, "val%03d", i);
snprintf(key, 7, "key%03d", i);
snprintf(value, 7, "val%03d", i);
doc[key] = value;
}
doc.shrinkToFit();
Expand Down
4 changes: 2 additions & 2 deletions src/test/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ namespace emsesp {
// #define EMSESP_DEBUG_DEFAULT "boiler"
// #define EMSESP_DEBUG_DEFAULT "mqtt2"
// #define EMSESP_DEBUG_DEFAULT "mqtt_nested"
// #define EMSESP_DEBUG_DEFAULT "ha"
#define EMSESP_DEBUG_DEFAULT "ha"
// #define EMSESP_DEBUG_DEFAULT "board_profile"
// #define EMSESP_DEBUG_DEFAULT "shower_alert"
// #define EMSESP_DEBUG_DEFAULT "310"
#define EMSESP_DEBUG_DEFAULT "render"
// #define EMSESP_DEBUG_DEFAULT "render"
// #define EMSESP_DEBUG_DEFAULT "api"
// #define EMSESP_DEBUG_DEFAULT "crash"

Expand Down

0 comments on commit b214d7a

Please sign in to comment.