From b40f4d2dc6faee4df6d6bda314ab59998d0a3869 Mon Sep 17 00:00:00 2001 From: Aart van Halteren Date: Sat, 3 Jan 2026 19:58:03 +0100 Subject: [PATCH] Add 2026 tarifs and rates --- app/models/cost.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/models/cost.rb b/app/models/cost.rb index 6edd8b3..04ec750 100644 --- a/app/models/cost.rb +++ b/app/models/cost.rb @@ -6,8 +6,8 @@ EASY_ENERGY_TARIFFS = {} # See https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/zakelijk/overige_belastingen/belastingen_op_milieugrondslag/tarieven_milieubelastingen/tabellen_tarieven_milieubelastingen # Without VAT -ENERGY_TAX_KWH = { 2020 => 0.09770, 2021 => 0.09428, 2022 => 0.03679, 2023 => 0.12599, 2024 => 0.10880, 2025 => 0.10154} -ODE_KWH = { 2020 => 0.0273, 2021 => 0.0300, 2022 => 0.0305, 2023 => 0.0, 2024 => 0.0, 2025 => 0.0} +ENERGY_TAX_KWH = { 2020 => 0.09770, 2021 => 0.09428, 2022 => 0.03679, 2023 => 0.12599, 2024 => 0.10880, 2025 => 0.10154, 2026 => 0.09157 } +ODE_KWH = { 2020 => 0.0273, 2021 => 0.0300, 2022 => 0.0305, 2023 => 0.0, 2024 => 0.0, 2025 => 0.0, 2026 =>0.0} # merge by adding values TAX_KWH = ENERGY_TAX_KWH.merge(ODE_KWH){|key, energy_tax, ode| energy_tax + ode} @@ -82,10 +82,7 @@ class Cost end when 2023 0.018 - when 2024 - # opslag met BTW: 0,02178 - 0.018457 - when 2025 + when 2024..2026 # opslag met BTW: 0,02178 0.018457 end @@ -93,7 +90,8 @@ 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 + 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) end @@ -303,6 +301,10 @@ class Cost vat = 1 + vat_at(Date.parse(formatted_hour)) 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 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