You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you apply price modifier template for Fixing 1 Rate
{% set s = {
"VAT": 1.23,
"offpeak_distribution_rate": 9.028,
"peak_distribution_rate": 36.898,
"market_access_fee": 8.8
}
%}
{# Define peak periods for G12W tariff as a list of tuples (start_hour, stop_hour) #}
{% set peaks = [(6, 13), (15, 22)] %}
{# Determine if it's a weekend (offpeak all day) #}
{% set is_weekend = now().weekday() >= 5 %}
{# Check if the current time falls within any peak period #}
{% set is_peak = False %}
{% if not is_weekend %}
{% for peak in peaks %}
{% if now().hour >= peak[0] and now().hour < peak[1] %}
{% set is_peak = True %}
{% endif %}
{% endfor %}
{% endif %}
{# Set distribution rate based on peak or offpeak time #}
{% set distribution_rate = s.peak_distribution_rate if is_peak else s.offpeak_distribution_rate %}
{# Final price calculation: convert current_price to PLN, add distribution rate, market access fee, and apply VAT #}
{{ (fixing1_rate + distribution_rate + s.market_access_fee)| float }}
Integration returns price 26,783, which is incorrect.
25 + 9.028 + 8.8 = 42,828
The text was updated successfully, but these errors were encountered:
This functionality works as designed - all calculations are performed in zł/MWh and MWh and templates should return values in the same units. Conversion to user-configured units is performed later.
Documentation and config flow improvements have been released in v1.1.2
Situation from right now, 21.12.2024, hour 21:20
https://tge.pl/energia-elektryczna-rdn?dateShow=20-12-2024&dateAction=prev
At 21.12.2024 21:20, that's between 21 and 22 price is 25gr/kWh
Integration without price modifier template shows correct 25gr/kWh.
When you apply price modifier template for
Fixing 1 Rate
Integration returns price
26,783
, which is incorrect.25 + 9.028 + 8.8 = 42,828
The text was updated successfully, but these errors were encountered: