Skip to content

Commit

Permalink
fix infinite state switch if battery is above
Browse files Browse the repository at this point in the history
startThreshold and solar passtrhough is enabled
  • Loading branch information
helgeerbe committed Apr 6, 2023
1 parent 4eec055 commit e29708f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PowerLimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void PowerLimiterClass::loop()
_plState = STATE_OFF;
break;
}
if (canUseDirectSolarPower() && (config.PowerLimiter_BatteryDrainStategy == EMPTY_AT_NIGHT)) {
if (!isStartThresholdReached(inverter) && canUseDirectSolarPower() && (config.PowerLimiter_BatteryDrainStategy == EMPTY_AT_NIGHT)) {
_plState = STATE_CONSUME_SOLAR_POWER_ONLY;
break;
}
Expand Down

0 comments on commit e29708f

Please sign in to comment.