Skip to content

Commit

Permalink
Merge branch 'feature/remove-rounding-from-zha-integration' of https:…
Browse files Browse the repository at this point in the history
…//github.com/Roeland54/core into feature/remove-rounding-from-zha-integration
  • Loading branch information
Roeland authored and Roeland committed Dec 20, 2023
2 parents 032fc1f + 96a10cd commit fe42259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homeassistant/components/zha/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def create_entity(
def formatter(value: int) -> int | float | None:
"""Return the state of the entity."""
# per zcl specs battery percent is reported at 200% ¯\_(ツ)_/¯
if not isinstance(value, numbers.Number) or value == -1 or value == 255:
if not isinstance(value, numbers.Number) or value == -1:
return None
return value / 2

Expand Down

0 comments on commit fe42259

Please sign in to comment.