diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index d55223419..eea686639 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -828,9 +828,9 @@ void _showerColdShotStart() { // callback for loading/saving settings to the file system (SPIFFS) bool FSCallback(MYESP_FSACTION action, const JsonObject json) { - bool recreate_config = true; - if (action == MYESP_FSACTION_LOAD) { + bool recreate_config = true; + // led EMSESP_Status.led = json["led"]; diff --git a/src/ems.cpp b/src/ems.cpp index 1c4ac5c4f..91ed18fe9 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -1456,45 +1456,6 @@ void ems_discoverModels() { } } -/* - * Given a thermostat model ID go and fetch its characteristics - */ -void _ems_setThermostatModel(uint8_t thermostat_modelid) { - bool found = false; - uint8_t i = 0; - const _Thermostat_Type * thermostat_type; - while (i < _Thermostat_Types_max) { - thermostat_type = &Thermostat_Types[i]; - if (thermostat_type->model_id == thermostat_modelid) { - found = true; // we have a matching product id - break; - } - i++; - } - - if (!found) { - if (EMS_Sys_Status.emsLogging >= EMS_SYS_LOGGING_BASIC) { - myDebug("Unknown thermostat model specified. Trying a scan..."); - } - ems_scanDevices(); // auto-discover it - return; - } - - // set the thermostat - if (EMS_Sys_Status.emsLogging >= EMS_SYS_LOGGING_BASIC) { - myDebug("Setting Thermostat. Model %s with TypeID 0x%02X, ProductID %d", - thermostat_type->model_string, - thermostat_type->type_id, - thermostat_type->product_id); - } - - // set its capabilities - EMS_Thermostat.model_id = thermostat_type->model_id; - EMS_Thermostat.type_id = thermostat_type->type_id; - EMS_Thermostat.read_supported = thermostat_type->read_supported; - EMS_Thermostat.write_supported = thermostat_type->write_supported; -} - /** * Print the Tx queue - for debugging */ diff --git a/src/ems.h b/src/ems.h index 92752d23a..c1f0d3e4d 100644 --- a/src/ems.h +++ b/src/ems.h @@ -315,7 +315,6 @@ void _debugPrintPackage(const char * prefix, _EMS_RxTelegram * EMS_RxTelegram void _ems_clearTxData(); int _ems_findBoilerModel(uint8_t model_id); bool _ems_setModel(uint8_t model_id); -void _ems_setThermostatModel(uint8_t thermostat_modelid); void _removeTxQueue(); void _ems_readTelegram(uint8_t * telegram, uint8_t length);