From 8725c12a68c7cbc9dd2be1feccf0f12816d13361 Mon Sep 17 00:00:00 2001 From: Aart van Halteren Date: Mon, 10 Jan 2022 21:33:46 +0100 Subject: [PATCH] bux fix --- app/models/entsoe.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/entsoe.rb b/app/models/entsoe.rb index fc681a8..83f925b 100644 --- a/app/models/entsoe.rb +++ b/app/models/entsoe.rb @@ -45,7 +45,7 @@ class Entsoe # 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) 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 lowest_hour = sorted_prices.first[0]