replace STANDALONE_DUMP with a parameter set during tests call test_test_set_all_active

This commit is contained in:
proddy
2023-01-07 21:28:33 +01:00
parent 6ed378086b
commit 60b424705d
16 changed files with 151 additions and 68 deletions

View File

@@ -184,10 +184,11 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
// register device values for common values (not heating circuit)
register_device_values();
#if defined(EMSESP_STANDALONE_DUMP)
// if we're just dumping out values, create a single dummy hc1
register_device_values_hc(std::make_shared<emsesp::Thermostat::HeatingCircuit>(1, model)); // hc=1
#endif
if (System::test_set_all_active()) {
Serial.println("DEBUG TEST: adding a fake hc");
// if we're just dumping out values, create a single dummy hc1
register_device_values_hc(std::make_shared<emsesp::Thermostat::HeatingCircuit>(1, model)); // hc=1
}
// query all the heating circuits. This is only done once.
// The automatic fetch will from now on only update the active heating circuits