mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
boiler energy counter, stored in nvs
This commit is contained in:
@@ -231,9 +231,14 @@ bool System::command_watch(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void System::store_boiler_energy() {
|
||||
Command::call(EMSdevice::DeviceType::BOILER, "nompower", "-1"); // trigger a write
|
||||
}
|
||||
|
||||
// restart EMS-ESP
|
||||
void System::system_restart() {
|
||||
LOG_INFO("Restarting EMS-ESP...");
|
||||
store_boiler_energy();
|
||||
Shell::loop_all();
|
||||
delay(1000); // wait a second
|
||||
#ifndef EMSESP_STANDALONE
|
||||
|
||||
Reference in New Issue
Block a user