This commit is contained in:
Aart van Halteren
2022-01-10 21:33:46 +01:00
parent 86c09b6bf9
commit 8725c12a68

View File

@@ -45,7 +45,7 @@ class Entsoe
# From Apr-Oct: do not charge; every hour that has cost > 0 is a high_hour # From Apr-Oct: do not charge; every hour that has cost > 0 is a high_hour
if [4,5,6,7,8,9,10].include?(date.month) if [4,5,6,7,8,9,10].include?(date.month)
lowest_hour = "" # effectively no charging from grid lowest_hour = "" # effectively no charging from grid
high_hours = sorted_prices.select{|p| p[1] > 0} high_hours = sorted_prices.select{|p| p[1] > 0}.to_h.keys
else else
lowest_hour = sorted_prices.first[0] lowest_hour = sorted_prices.first[0]