Skip to content

Commit

Permalink
JonasPed#51: Changed attribute to array for easier use.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rune A. Juel Mønnike committed Oct 7, 2022
1 parent b48094f commit ffd0b1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/eloverblik/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def state(self):
@property
def extra_state_attributes(self):
"""Return state attributes."""
attributes = {f"hour_{i}": self._data_hourly_tariff_sums[i] for i in range(24)}
attributes = {
"hourly": [self._data_hourly_tariff_sums[i] for i in range(24)]
}

return attributes

Expand Down

0 comments on commit ffd0b1b

Please sign in to comment.