Fixed issue with new device

This commit is contained in:
Gunnar Skjold 2023-05-22 09:55:15 +02:00
parent 9f7e174c7b
commit 550d32ee33
2 changed files with 2 additions and 1 deletions

View File

@ -329,7 +329,7 @@ void AmsWebServer::sysinfoJson() {
ea->getCostLastMonth(),
ea->getProducedLastMonth(),
ea->getIncomeLastMonth(),
(tz->toLocal(now)-now)/3600
tz == NULL ? 0 : (tz->toLocal(now)-now)/3600
);
stripNonAscii((uint8_t*) buf, size+1);

View File

@ -414,6 +414,7 @@ void setup() {
ea.load();
ea.setEapi(eapi);
ws.setup(&config, &gpioConfig, &meterConfig, &meterState, &ds, &ea);
handleNtpChange();
#if defined(ESP32)
esp_task_wdt_init(WDT_TIMEOUT, true);