mixing unit test

This commit is contained in:
proddy
2020-10-08 21:12:31 +02:00
parent df86f18be9
commit 922b15cbbd

View File

@@ -28,7 +28,7 @@ namespace emsesp {
// used with the 'test' command, under su/admin // used with the 'test' command, under su/admin
void Test::run_test(uuid::console::Shell & shell, const std::string & command) { void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
if (command == "default") { 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()) { if (command.empty()) {
@@ -783,6 +783,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
if (command == "mixing") { if (command == "mixing") {
shell.printfln(F("Testing 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); EMSESP::rxservice_.ems_mask(EMSbus::EMS_MASK_BUDERUS);
std::string version("1.2.3"); std::string version("1.2.3");