Skip to content

Commit

Permalink
#48: Fixed if/elif/else structure to avoid misleading errors in log.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rune A. Juel Mønnike committed Sep 15, 2022
1 parent 563b9c3 commit d997caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/eloverblik/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def update(self):

if self._sensor_type == 'hour':
self._state = self._data.get_usage_hour(self._hour)
if self._sensor_type == 'total':
elif self._sensor_type == 'total':
self._state = self._data.get_total_day()
elif self._sensor_type == 'year_total':
self._state = self._data.get_total_year()
Expand Down

0 comments on commit d997caa

Please sign in to comment.