Add 2026 tarifs and rates

This commit is contained in:
2026-01-03 19:58:03 +01:00
parent 24dd351249
commit b40f4d2dc6

View File

@@ -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 # See https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/zakelijk/overige_belastingen/belastingen_op_milieugrondslag/tarieven_milieubelastingen/tabellen_tarieven_milieubelastingen
# Without VAT # Without VAT
ENERGY_TAX_KWH = { 2020 => 0.09770, 2021 => 0.09428, 2022 => 0.03679, 2023 => 0.12599, 2024 => 0.10880, 2025 => 0.10154} 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} 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 # merge by adding values
TAX_KWH = ENERGY_TAX_KWH.merge(ODE_KWH){|key, energy_tax, ode| energy_tax + ode} TAX_KWH = ENERGY_TAX_KWH.merge(ODE_KWH){|key, energy_tax, ode| energy_tax + ode}
@@ -82,10 +82,7 @@ class Cost
end end
when 2023 when 2023
0.018 0.018
when 2024 when 2024..2026
# opslag met BTW: 0,02178
0.018457
when 2025
# opslag met BTW: 0,02178 # opslag met BTW: 0,02178
0.018457 0.018457
end end
@@ -93,7 +90,8 @@ class Cost
def easy_energy_cost(formatted_hour, usage_kwh, return_kwh) def easy_energy_cost(formatted_hour, usage_kwh, return_kwh)
return nil if (usage_kwh.nil? || return_kwh.nil?) 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))) 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) add_tax(formatted_hour, usage_kwh, usage_kwh_cost, return_kwh, return_kwh_cost)
end end
@@ -303,6 +301,10 @@ class Cost
vat = 1 + vat_at(Date.parse(formatted_hour)) vat = 1 + vat_at(Date.parse(formatted_hour))
normaal_kwh_cost = 0.2695*vat normaal_kwh_cost = 0.2695*vat
dal_kwh_cost = 0.2296*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 else
p "Not supported interval Oxxio for value: %d" % date.to_time.to_i p "Not supported interval Oxxio for value: %d" % date.to_time.to_i
# catch-all, incase 'formated_hour' is outside any of the cases # catch-all, incase 'formated_hour' is outside any of the cases