Skip to content

Commit

Permalink
Fix rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Feb 14, 2024
1 parent d83e988 commit a3c5b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/battery_notes/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def rounded_battery_level(self) -> float:
def _rounded_level(self, value) -> float:
"""Round the level, if preferred."""
if isfloat(value):
return round(float(value), 0 if value else 1)
return round(float(value), None if self._round_battery else 1)
else:
return value

Expand Down

0 comments on commit a3c5b68

Please sign in to comment.