From 922b15cbbd3cbcdbfe100c5c57f4e57a0b68f5db Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 8 Oct 2020 21:12:31 +0200 Subject: [PATCH] mixing unit test --- src/test/test.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/test/test.cpp b/src/test/test.cpp index 2865e3444..5cafd69d1 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -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, "mixing"); // add the default test case here } if (command.empty()) { @@ -783,6 +783,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & command) { if (command == "mixing") { shell.printfln(F("Testing Mixing...")); + // change MQTT format + EMSESP::esp8266React.getMqttSettingsService()->updateWithoutPropagation([&](MqttSettings & mqttSettings) { + // mqttSettings.mqtt_format = Mqtt::Format::SINGLE; + // mqttSettings.mqtt_format = Mqtt::Format::NESTED; + mqttSettings.mqtt_format = Mqtt::Format::HA; + return StateUpdateResult::CHANGED; + }); + EMSESP::rxservice_.ems_mask(EMSbus::EMS_MASK_BUDERUS); std::string version("1.2.3");