fix for MQTT from HA for different heating circuits - #536

This commit is contained in:
proddy
2020-10-06 22:30:20 +02:00
parent 5e02b1a236
commit 39a435cec3
4 changed files with 40 additions and 27 deletions

View File

@@ -28,7 +28,7 @@ namespace emsesp {
// used with the 'test' command, under su/admin
void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
if (command == "default") {
run_test(shell, "fr120"); // add the default test case here
run_test(shell, "thermostat"); // add the default test case here
}
if (command.empty()) {
@@ -252,7 +252,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
shell.invoke_command("show");
}
if (command == "fr120") {
if (command == "fr120") {
shell.printfln(F("Testing adding a thermostat FR120..."));
// add_device(0x10, 165, version, EMSdevice::Brand::BUDERUS);
@@ -307,6 +307,10 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
uart_telegram({0x90, 0x00, 0xFF, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
shell.invoke_command("show");
EMSESP::mqtt_.incoming("ems-esp/thermostat_hc1", "heat");
EMSESP::mqtt_.incoming("ems-esp/thermostat_hc2", "28.8");
EMSESP::mqtt_.incoming("ems-esp/thermostat", "{\"cmd\":\"temp\",\"id\":2,\"data\":22}");
}
if (command == "tc100") {