Fixed discover when setting different hostname in setup

This commit is contained in:
Gunnar Skjold
2022-12-14 18:15:46 +01:00
parent 7ea4fe881c
commit 28a9d6746b
5 changed files with 11 additions and 9 deletions

View File

@@ -311,9 +311,9 @@ void AmsWebServer::dataJson() {
uint8_t hanStatus;
if(meterState->getLastError() < 0) {
if(meterState->getLastError() != 0) {
hanStatus = 3;
} else if((meterConfig->baud == 0 || meterState->getLastUpdateMillis() == 0) && millis < 15000) {
} else if((meterConfig->baud == 0 || meterState->getLastUpdateMillis() == 0) && millis < 30000) {
hanStatus = 0;
} else if(millis - meterState->getLastUpdateMillis() < 15000) {
hanStatus = 1;