Skip to content

Commit

Permalink
Merge pull request #306 from dougiteixeira/sensors-unknonw-fix
Browse files Browse the repository at this point in the history
Displays zero instead of unknown on sensors
  • Loading branch information
dougiteixeira authored May 19, 2024
2 parents 5f9febd + 14b3438 commit 8d55338
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/proxmoxve/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,9 @@ def native_value(self) -> StateType:
elif self.entity_description.key in (
ProxmoxKeyAPIParse.CPU,
ProxmoxKeyAPIParse.UPDATE_TOTAL,
ProxmoxKeyAPIParse.MEMORY_USED,
ProxmoxKeyAPIParse.DISK_USED,
ProxmoxKeyAPIParse.SWAP_USED,
):
return 0
else:
Expand Down

0 comments on commit 8d55338

Please sign in to comment.