mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
2.0.0.a31 with Michael's last PR
This commit is contained in:
@@ -1356,13 +1356,13 @@ void Thermostat::set_control(const uint8_t ctrl, const uint8_t hc_num) {
|
|||||||
|
|
||||||
// sets the thermostat ww working mode, where mode is a string
|
// sets the thermostat ww working mode, where mode is a string
|
||||||
void Thermostat::set_ww_mode(const std::string & mode) {
|
void Thermostat::set_ww_mode(const std::string & mode) {
|
||||||
if (strcasecmp("off",mode.c_str()) == 0) {
|
if (strcasecmp("off", mode.c_str()) == 0) {
|
||||||
LOG_INFO(F("Setting thermostat warm water mode to %s"), mode.c_str());
|
LOG_INFO(F("Setting thermostat warm water mode to %s"), mode.c_str());
|
||||||
write_command(EMS_TYPE_wwSettings, 2, 0);
|
write_command(EMS_TYPE_wwSettings, 2, 0);
|
||||||
} else if (strcasecmp("on",mode.c_str()) == 0) {
|
} else if (strcasecmp("on", mode.c_str()) == 0) {
|
||||||
LOG_INFO(F("Setting thermostat warm water mode to %s"), mode.c_str());
|
LOG_INFO(F("Setting thermostat warm water mode to %s"), mode.c_str());
|
||||||
write_command(EMS_TYPE_wwSettings, 2, 1);
|
write_command(EMS_TYPE_wwSettings, 2, 1);
|
||||||
} else if (strcasecmp("auto",mode.c_str()) == 0) {
|
} else if (strcasecmp("auto", mode.c_str()) == 0) {
|
||||||
LOG_INFO(F("Setting thermostat warm water mode to %s"), mode.c_str());
|
LOG_INFO(F("Setting thermostat warm water mode to %s"), mode.c_str());
|
||||||
write_command(EMS_TYPE_wwSettings, 2, 2);
|
write_command(EMS_TYPE_wwSettings, 2, 2);
|
||||||
} else {
|
} else {
|
||||||
@@ -1629,7 +1629,8 @@ void Thermostat::set_temperature(const float temperature, const uint8_t mode, co
|
|||||||
default:
|
default:
|
||||||
case HeatingCircuit::Mode::AUTO: // automatic selection, if no type is defined, we use the standard code
|
case HeatingCircuit::Mode::AUTO: // automatic selection, if no type is defined, we use the standard code
|
||||||
uint8_t mode_type = hc->get_mode_type(flags());
|
uint8_t mode_type = hc->get_mode_type(flags());
|
||||||
offset = (mode_type == HeatingCircuit::Mode::NIGHT || mode_type == HeatingCircuit::Mode::ECO) ? EMS_OFFSET_JunkersSetMessage_night_temp : EMS_OFFSET_JunkersSetMessage_day_temp;
|
offset = (mode_type == HeatingCircuit::Mode::NIGHT || mode_type == HeatingCircuit::Mode::ECO) ? EMS_OFFSET_JunkersSetMessage_night_temp
|
||||||
|
: EMS_OFFSET_JunkersSetMessage_day_temp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1743,13 +1744,9 @@ void Thermostat::console_commands(Shell & shell, unsigned int context) {
|
|||||||
CommandFlags::ADMIN,
|
CommandFlags::ADMIN,
|
||||||
flash_string_vector{F_(change), F_(wwmode)},
|
flash_string_vector{F_(change), F_(wwmode)},
|
||||||
flash_string_vector{F_(mode_mandatory)},
|
flash_string_vector{F_(mode_mandatory)},
|
||||||
[=](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments) {
|
[=](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments) { set_ww_mode(arguments.front()); },
|
||||||
set_ww_mode(arguments.front());
|
|
||||||
},
|
|
||||||
[](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments __attribute__((unused))) -> const std::vector<std::string> {
|
[](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments __attribute__((unused))) -> const std::vector<std::string> {
|
||||||
return std::vector<std::string>{read_flash_string(F("off")),
|
return std::vector<std::string>{read_flash_string(F("off")), read_flash_string(F("on")), read_flash_string(F("auto"))
|
||||||
read_flash_string(F("on")),
|
|
||||||
read_flash_string(F("auto"))
|
|
||||||
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "2.0.0a30"
|
#define EMSESP_APP_VERSION "2.0.0a31"
|
||||||
|
|||||||
Reference in New Issue
Block a user