From d6213e963aefdcdc64d507a8eab8373411fe2c1b Mon Sep 17 00:00:00 2001 From: Aart van Halteren Date: Mon, 10 Jan 2022 16:59:35 +0100 Subject: [PATCH] fix --- app/models/cost.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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