Skip to content

Commit

Permalink
Merge pull request #317 from ljungqvist/master
Browse files Browse the repository at this point in the history
fix: template_value was made positive if price was negative
  • Loading branch information
Hellowlol authored Apr 30, 2023
2 parents 9d47183 + 5357b3a commit 75a2d89
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions custom_components/nordpool/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ def inner(*_, **__):

self._additional_costs_value = template_value
try:
# If the price is negative, subtract the additional costs from the price
template_value = abs(template_value) if price < 0 else template_value
price += template_value
except Exception:
_LOGGER.debug(
Expand Down

0 comments on commit 75a2d89

Please sign in to comment.