Skip to content

Commit

Permalink
Add more CPU load sensors (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
madox398 authored Oct 28, 2024
1 parent a0a1824 commit 628bd91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions glances_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ async def get_ha_sensor_data(self) -> dict[str, Any]:
}
if data := self.data.get("load"):
sensor_data["load"] = {
"processor_load": data.get("min15")
or self.data["cpu"]["total"] # to be checked
"processor_load": data.get("min15"),
"processor_load_1m": data.get("min1"),
"processor_load_5m": data.get("min5"),
}
if data := self.data.get("processcount"):
sensor_data["processcount"] = {
Expand Down

0 comments on commit 628bd91

Please sign in to comment.