-
Hi, I'm trying to use additional costs template to calculate the price that I will pay in the end. The price structure is roughly:
I see from the code that the integration calculates VAT (if set to true) before current_prices is passed to the template, which I can adjust for, but I still get values which are too high - for example for current_price = 1, FACTOR of 1.30, offset of 0.67, I was expecting to get 2.3 (VAT is 1.25) but instead the result was around 4. Any suggestions how to set the template to get this right? I know I could create an additional template sensor in Hass to do that, but since this is already in place... :) Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I reread the section on Additional costs, what I thought should be:
additional_cost is added on top of the current_price, does not replace it completely as I thought. |
Beta Was this translation helpful? Give feedback.
I reread the section on Additional costs, what I thought should be:
{{ ( current_price * 1.30 + 0.67 ) | float }}
is actually{{ current_price * 0.30 + 0.67 * 1.25 | float }}
additional_cost is added on top of the current_price, does not replace it completely as I thought.