Skip to content

Commit

Permalink
Change fix as per #discussion_r729083583
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Lowper committed Oct 18, 2021
1 parent 47f798f commit d2ea43c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homeassistant/components/freebox/sensor.py
Expand Up @@ -178,6 +178,6 @@ def device_info(self) -> DeviceInfo:
def async_update_state(self) -> None:
"""Update the Freebox disk sensor."""
value = 0
if "total_bytes" in self._partition and self._partition["total_bytes"]:
if self._partition.get("total_bytes"):
value = self._partition["free_bytes"] * 100 / self._partition["total_bytes"]
self._state = round(value, 2)

0 comments on commit d2ea43c

Please sign in to comment.