mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
Add agent version to Supervisor system health (#72360)
Co-authored-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
parent
deedbca46c
commit
f90effc299
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"system_health": {
|
"system_health": {
|
||||||
"info": {
|
"info": {
|
||||||
|
"agent_version": "Agent Version",
|
||||||
"board": "Board",
|
"board": "Board",
|
||||||
"disk_total": "Disk Total",
|
"disk_total": "Disk Total",
|
||||||
"disk_used": "Disk Used",
|
"disk_used": "Disk Used",
|
||||||
|
@ -44,6 +44,7 @@ async def system_health_info(hass: HomeAssistant):
|
|||||||
"host_os": host_info.get("operating_system"),
|
"host_os": host_info.get("operating_system"),
|
||||||
"update_channel": info.get("channel"),
|
"update_channel": info.get("channel"),
|
||||||
"supervisor_version": f"supervisor-{info.get('supervisor')}",
|
"supervisor_version": f"supervisor-{info.get('supervisor')}",
|
||||||
|
"agent_version": host_info.get("agent_version"),
|
||||||
"docker_version": info.get("docker"),
|
"docker_version": info.get("docker"),
|
||||||
"disk_total": f"{host_info.get('disk_total')} GB",
|
"disk_total": f"{host_info.get('disk_total')} GB",
|
||||||
"disk_used": f"{host_info.get('disk_used')} GB",
|
"disk_used": f"{host_info.get('disk_used')} GB",
|
||||||
|
@ -35,6 +35,7 @@ async def test_hassio_system_health(hass, aioclient_mock):
|
|||||||
}
|
}
|
||||||
hass.data["hassio_host_info"] = {
|
hass.data["hassio_host_info"] = {
|
||||||
"operating_system": "Home Assistant OS 5.9",
|
"operating_system": "Home Assistant OS 5.9",
|
||||||
|
"agent_version": "1337",
|
||||||
"disk_total": "32.0",
|
"disk_total": "32.0",
|
||||||
"disk_used": "30.0",
|
"disk_used": "30.0",
|
||||||
}
|
}
|
||||||
@ -52,6 +53,7 @@ async def test_hassio_system_health(hass, aioclient_mock):
|
|||||||
info[key] = await val
|
info[key] = await val
|
||||||
|
|
||||||
assert info == {
|
assert info == {
|
||||||
|
"agent_version": "1337",
|
||||||
"board": "odroid-n2",
|
"board": "odroid-n2",
|
||||||
"disk_total": "32.0 GB",
|
"disk_total": "32.0 GB",
|
||||||
"disk_used": "30.0 GB",
|
"disk_used": "30.0 GB",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user