Feature: DPL: keep inverter running if solar powered

avoid shutting down the inverter at all if the calculated power limit
falls below the lower power limit or if the power meter value is
outdated. do this only if the inverter is setup to be solar powered.
This commit is contained in:
Bernhard Kirchen 2024-03-09 14:34:08 +01:00
parent 91f8f61e63
commit 80edbec769

View File

@ -92,7 +92,15 @@ bool PowerLimiterClass::shutdown(PowerLimiterClass::Status status)
_shutdownPending = true;
_oTargetPowerState = false;
_oTargetPowerLimitWatts = Configuration.get().PowerLimiter.LowerPowerLimit;
auto const& config = Configuration.get();
if ( (Status::PowerMeterTimeout == status ||
Status::CalculatedLimitBelowMinLimit == status)
&& config.PowerLimiter.IsInverterSolarPowered) {
_oTargetPowerState = true;
}
_oTargetPowerLimitWatts = config.PowerLimiter.LowerPowerLimit;
return updateInverter();
}