diff --git a/app/models/cost.rb b/app/models/cost.rb index 6909ebd..cc70b2d 100644 --- a/app/models/cost.rb +++ b/app/models/cost.rb @@ -161,7 +161,7 @@ class Cost # charge battery with return_kwh return_kwh -= battery.charge(return_kwh) - if low_hour.eql?(formatted_hour) + if lowest_hour.eql?(formatted_hour) # charge battery during lowest hour usage_kwh += battery.charge(max_charge_kwh) else