remove master_thermostat

This commit is contained in:
MichaelDvP
2022-02-28 10:51:45 +01:00
parent c1fd964344
commit eb9df59f15
17 changed files with 2560 additions and 2386 deletions

View File

@@ -228,10 +228,6 @@ void EMSESPShell::add_console_commands() {
EMSESP::webSettingsService.read([&](WebSettings & settings) {
shell.printfln(F_(tx_mode_fmt), settings.tx_mode);
shell.printfln(F_(bus_id_fmt), settings.ems_bus_id);
char buffer[4];
shell.printfln(F_(master_thermostat_fmt),
settings.master_thermostat == 0 ? read_flash_string(F_(auto)).c_str()
: Helpers::hextoa(buffer, settings.master_thermostat));
shell.printfln(F_(board_profile_fmt), settings.board_profile.c_str());
});
});
@@ -262,23 +258,6 @@ void EMSESPShell::add_console_commands() {
}
});
commands->add_command(ShellContext::MAIN,
CommandFlags::ADMIN,
flash_string_vector{F_(set), F_(master), F_(thermostat)},
flash_string_vector{F_(deviceid_mandatory)},
[](Shell & shell, const std::vector<std::string> & arguments) {
uint8_t value = Helpers::hextoint(arguments.front().c_str());
EMSESP::webSettingsService.update(
[&](WebSettings & settings) {
settings.master_thermostat = value;
EMSESP::actual_master_thermostat(value); // set the internal value too
char buffer[5];
shell.printfln(F_(master_thermostat_fmt), !value ? read_flash_string(F_(auto)).c_str() : Helpers::hextoa(buffer, value));
return StateUpdateResult::CHANGED;
},
"local");
});
#ifndef EMSESP_STANDALONE
commands->add_command(ShellContext::MAIN,
CommandFlags::USER,