1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-20 02:18:59 +00:00

Fix disk usage calculation (#6339)

This commit is contained in:
Petar Petrov
2025-11-24 16:35:13 +02:00
committed by GitHub
parent 3be0c13fc5
commit 906838e325

View File

@@ -343,7 +343,7 @@ class APIHost(CoreSysAttributes):
disk = self.sys_hardware.disk disk = self.sys_hardware.disk
total, used, _ = await self.sys_run_in_executor( total, _, free = await self.sys_run_in_executor(
disk.disk_usage, self.sys_config.path_supervisor disk.disk_usage, self.sys_config.path_supervisor
) )
@@ -365,12 +365,13 @@ class APIHost(CoreSysAttributes):
"id": "root", "id": "root",
"label": "Root", "label": "Root",
"total_bytes": total, "total_bytes": total,
"used_bytes": used, "used_bytes": total - free,
"children": [ "children": [
{ {
"id": "system", "id": "system",
"label": "System", "label": "System",
"used_bytes": used "used_bytes": total
- free
- sum(path["used_bytes"] for path in known_paths), - sum(path["used_bytes"] for path in known_paths),
}, },
*known_paths, *known_paths,