Skip to content

Commit fa17557

Browse files
authored
negative prices vat should do correct calculation
1 parent a6e8cc2 commit fa17557

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/nordpool/sensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def inner(*_, **__):
261261

262262
return pass_context(inner)
263263

264-
price = value / _PRICE_IN[self._price_type] * (float(1 + self._vat))
264+
price = value / _PRICE_IN[self._price_type] + (_PRICE_IN[self._price_type]*float(self._vat))
265265
template_value = self._ad_template.async_render(
266266
now=faker(), current_price=price
267267
)

0 commit comments

Comments
 (0)