Skip to content

Commit

Permalink
Renamed "off peak <num>" to "off_peak_<num>"
Browse files Browse the repository at this point in the history
Renamed attributes "off peak <num>" to "off_peak_<num>" to be able to use the attributes easier in templates.

Example: {{ states.sensor.nordpool_kwh_se3_sek_3_10_025.attributes.off_peak_2 }}
  • Loading branch information
rasssta authored Dec 23, 2021
1 parent fd7caaf commit f5ce7d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/nordpool/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ def device_state_attributes(self) -> dict:
return {
"current_price": self.current_price,
"average": self._average,
"off peak 1": self._off_peak_1,
"off peak 2": self._off_peak_2,
"off_peak_1": self._off_peak_1,
"off_peak_2": self._off_peak_2,
"peak": self._peak,
"min": self._min,
"max": self._max,
Expand Down

0 comments on commit f5ce7d5

Please sign in to comment.