Cost 2024 added

This commit is contained in:
2025-01-06 10:05:25 +01:00
parent 3b45e92734
commit 9be1ad71c2
3 changed files with 15 additions and 5 deletions

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
# Without VAT
ENERGY_TAX_KWH = { 2020 => 0.09770, 2021 => 0.09428, 2022 => 0.03679, 2023 => 0.12599 }
ODE_KWH = { 2020 => 0.0273, 2021 => 0.0300, 2022 => 0.0305, 2023 => 0.0}
ENERGY_TAX_KWH = { 2020 => 0.09770, 2021 => 0.09428, 2022 => 0.03679, 2023 => 0.12599, 2024 => 0.10880 }
ODE_KWH = { 2020 => 0.0273, 2021 => 0.0300, 2022 => 0.0305, 2023 => 0.0, 2024 => 0.0}
# merge by adding values
TAX_KWH = ENERGY_TAX_KWH.merge(ODE_KWH){|key, energy_tax, ode| energy_tax + ode}
@@ -82,6 +82,9 @@ class Cost
end
when 2023
0.018
when 2024
# opslag met BTW: 0,02178
0.018457
end
end
@@ -250,6 +253,8 @@ class Cost
when 2023
# rate excl. VAT
high_tariff ? 0.47758 : 0.34165
when 2024
0.25767769
end
end
@@ -284,6 +289,11 @@ class Cost
vat = 1 + vat_at(Date.parse(formatted_hour))
normaal_kwh_cost = 0.47758*vat
dal_kwh_cost = 0.34165*vat
# From 1 Jan 2024 until 31 December 2024
when 1704063600..1735603199
vat = 1 + vat_at(Date.parse(formatted_hour))
normaal_kwh_cost = 0.25767769*vat
dal_kwh_cost = 0.25767769*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

View File

@@ -2,8 +2,8 @@ require "rubygems"
require "bundler/setup"
require "active_record"
require "open-uri"
require 'gr/plot'
require 'histogram'
#require 'gr/plot'
#require 'histogram'
project_root = File.dirname(File.absolute_path(__FILE__))
Dir.glob(project_root + "/app/models/*.rb").each{|f| require f}

View File

@@ -3,7 +3,7 @@ services:
db:
container_name: smartmeter_db
restart: unless-stopped
image: mysql
image: mysql:8.3
volumes:
- /home/pcog/smartmeter/data:/var/lib/mysql
ports: