mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
extended test for ha and entities command
This commit is contained in:
@@ -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);
|
shell.printfln("Float test from %f to %s", test_float, result);
|
||||||
|
|
||||||
uint16_t temp;
|
uint16_t temp;
|
||||||
double doub;
|
float doub;
|
||||||
temp = 0x0201; // decimal 513
|
temp = 0x0201; // decimal 513
|
||||||
doub = Helpers::round2(temp, 10); // divide by 10
|
doub = Helpers::round2(temp, 10); // divide by 10
|
||||||
shell.printfln("Round test from x%02X to %d to %f", temp, temp, doub);
|
shell.printfln("Round test from x%02X to %d to %f", temp, temp, doub);
|
||||||
@@ -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("call system publish");
|
||||||
shell.invoke_command("show mqtt");
|
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") {
|
if (command == "mqtt_nested") {
|
||||||
@@ -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)
|
// fit it up, to its limit of the Json buffer (which is about 169 records)
|
||||||
for (uint8_t i = 0; i < 200; i++) {
|
for (uint8_t i = 0; i < 200; i++) {
|
||||||
snprintf_P(key, 7, "key%03d", i);
|
snprintf(key, 7, "key%03d", i);
|
||||||
snprintf_P(value, 7, "val%03d", i);
|
snprintf(value, 7, "val%03d", i);
|
||||||
doc[key] = value;
|
doc[key] = value;
|
||||||
}
|
}
|
||||||
doc.shrinkToFit();
|
doc.shrinkToFit();
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ namespace emsesp {
|
|||||||
// #define EMSESP_DEBUG_DEFAULT "boiler"
|
// #define EMSESP_DEBUG_DEFAULT "boiler"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "mqtt2"
|
// #define EMSESP_DEBUG_DEFAULT "mqtt2"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "mqtt_nested"
|
// #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 "board_profile"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "shower_alert"
|
// #define EMSESP_DEBUG_DEFAULT "shower_alert"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "310"
|
// #define EMSESP_DEBUG_DEFAULT "310"
|
||||||
#define EMSESP_DEBUG_DEFAULT "render"
|
// #define EMSESP_DEBUG_DEFAULT "render"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "api"
|
// #define EMSESP_DEBUG_DEFAULT "api"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "crash"
|
// #define EMSESP_DEBUG_DEFAULT "crash"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user