Skip to content

Commit 628bd91

Browse files
authored
Add more CPU load sensors (#44)
1 parent a0a1824 commit 628bd91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

glances_api/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ async def get_ha_sensor_data(self) -> dict[str, Any]:
134134
}
135135
if data := self.data.get("load"):
136136
sensor_data["load"] = {
137-
"processor_load": data.get("min15")
138-
or self.data["cpu"]["total"] # to be checked
137+
"processor_load": data.get("min15"),
138+
"processor_load_1m": data.get("min1"),
139+
"processor_load_5m": data.get("min5"),
139140
}
140141
if data := self.data.get("processcount"):
141142
sensor_data["processcount"] = {

0 commit comments

Comments
 (0)