Add agent version to Supervisor system health (#72360)

Co-authored-by: Stefan Agner <stefan@agner.ch>
pull/72223/head
Joakim Sørensen 2022-05-23 18:22:49 +02:00 committed by GitHub
parent deedbca46c
commit f90effc299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
{
"system_health": {
"info": {
"agent_version": "Agent Version",
"board": "Board",
"disk_total": "Disk Total",
"disk_used": "Disk Used",

View File

@ -44,6 +44,7 @@ async def system_health_info(hass: HomeAssistant):
"host_os": host_info.get("operating_system"),
"update_channel": info.get("channel"),
"supervisor_version": f"supervisor-{info.get('supervisor')}",
"agent_version": host_info.get("agent_version"),
"docker_version": info.get("docker"),
"disk_total": f"{host_info.get('disk_total')} GB",
"disk_used": f"{host_info.get('disk_used')} GB",

View File

@ -35,6 +35,7 @@ async def test_hassio_system_health(hass, aioclient_mock):
}
hass.data["hassio_host_info"] = {
"operating_system": "Home Assistant OS 5.9",
"agent_version": "1337",
"disk_total": "32.0",
"disk_used": "30.0",
}
@ -52,6 +53,7 @@ async def test_hassio_system_health(hass, aioclient_mock):
info[key] = await val
assert info == {
"agent_version": "1337",
"board": "odroid-n2",
"disk_total": "32.0 GB",
"disk_used": "30.0 GB",