fix: HTTP power meter: retrieve multiple JSON paths

if only a single request was made (switch "Individual HTTP requests per
phase" is off), the user could still enable phase 2 and phase 3 config
and configure a respective JSON path. however, the value was never
extracted from the successful HTTP request for phase 1.

closes #637.
This commit is contained in:
Bernhard Kirchen 2024-03-23 22:10:26 +01:00
parent b8d0998a49
commit 12f7caf998

View File

@ -38,6 +38,13 @@ bool HttpPowerMeterClass::updateValues()
MessageOutput.printf("%s\r\n", httpPowerMeterError);
return false;
}
continue;
}
if(!tryGetFloatValueForPhase(i, phaseConfig.JsonPath)) {
MessageOutput.printf("[HttpPowerMeter] Getting the power of phase %d (from JSON fetched with Phase 1 config) failed.\r\n", i + 1);
MessageOutput.printf("%s\r\n", httpPowerMeterError);
return false;
}
}
return true;