From 947062391592f513e723157d1b8044538d021f02 Mon Sep 17 00:00:00 2001 From: Aart van Halteren Date: Sat, 3 Jan 2026 21:07:29 +0100 Subject: [PATCH] Fix Oxxio rates 2026 --- app/models/cost.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/models/cost.rb b/app/models/cost.rb index 04ec750..e7a37e8 100644 --- a/app/models/cost.rb +++ b/app/models/cost.rb @@ -90,7 +90,7 @@ class Cost def easy_energy_cost(formatted_hour, usage_kwh, return_kwh) return nil if (usage_kwh.nil? || return_kwh.nil?) - p "easy_energy_cost for " + formatted_hour + #p "easy_energy_cost for " + formatted_hour usage_kwh_cost = return_kwh_cost = (entsoe.price_at(formatted_hour)+easy_energy_rate(formatted_hour))*(1+vat_at(Date.parse(formatted_hour))) add_tax(formatted_hour, usage_kwh, usage_kwh_cost, return_kwh, return_kwh_cost) @@ -258,6 +258,8 @@ class Cost 0.25767769 when 2025 high_tariff ? 0.2695 : 0.2296 + when 2026 + high_tariff ? 0.23186 : 0.22442 end end @@ -302,9 +304,8 @@ class Cost normaal_kwh_cost = 0.2695*vat dal_kwh_cost = 0.2296*vat when 1767225600..1785887999 # 2026 full year - vat = 1 + vat_at(Date.parse(formatted_hour)) - normaal_kwh_cost = 0.23186*vat - dal_kwh_cost = 0.22442*vat + normaal_kwh_cost = 0.19161 + dal_kwh_cost = 0.18547 else p "Not supported interval Oxxio for value: %d" % date.to_time.to_i # catch-all, incase 'formated_hour' is outside any of the cases