mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-03-30 10:16:16 +00:00
add configurable VAT rate for electricity price calculations (#680)
* add configurable VAT rate for electricity price calculations * add VAT rate configuration for electricity price calculations in docs * added vat_rate * fix: Format VAT rate field definition according to ruff formatting standards --------- Co-authored-by: Börni <kontakt@bernhardhientz.com>
This commit is contained in:
@@ -127,7 +127,8 @@ class ElecPriceEnergyCharts(ElecPriceProvider):
|
||||
|
||||
# Convert EUR/MWh to EUR/Wh, apply charges and VAT if charges > 0
|
||||
if charges_wh > 0:
|
||||
price_wh = ((price_eur_per_mwh / 1_000_000) + charges_wh) * 1.19
|
||||
vat_rate = self.config.elecprice.vat_rate or 1.19
|
||||
price_wh = ((price_eur_per_mwh / 1_000_000) + charges_wh) * vat_rate
|
||||
else:
|
||||
price_wh = price_eur_per_mwh / 1_000_000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user