Prefix versions in system health (#44921)

* Prefix versions in system health

* Adjust test

* Update homeassistant/components/hassio/strings.json
pull/44957/head
Joakim Sørensen 2021-01-08 16:03:06 +01:00 committed by GitHub
parent 58195c64b7
commit d99bc99d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -43,7 +43,7 @@ async def system_health_info(hass: HomeAssistant):
information = { information = {
"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": info.get("supervisor"), "supervisor_version": f"supervisor-{info.get('supervisor')}",
"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",

View File

@ -9,11 +9,11 @@
"host_os": "Host Operating System", "host_os": "Host Operating System",
"installed_addons": "Installed Add-ons", "installed_addons": "Installed Add-ons",
"supervisor_api": "Supervisor API", "supervisor_api": "Supervisor API",
"supervisor_version": "Supervisor Version", "supervisor_version": "Version",
"supported": "Supported", "supported": "Supported",
"update_channel": "Update Channel", "update_channel": "Update Channel",
"version_api": "Version API" "version_api": "Version API"
} }
}, },
"title": "Hass.io" "title": "Home Assistant Supervisor"
} }

View File

@ -17,7 +17,7 @@ async def system_health_info(hass):
info = await system_info.async_get_system_info(hass) info = await system_info.async_get_system_info(hass)
return { return {
"version": info.get("version"), "version": f"core-{info.get('version')}",
"installation_type": info.get("installation_type"), "installation_type": info.get("installation_type"),
"dev": info.get("dev"), "dev": info.get("dev"),
"hassio": info.get("hassio"), "hassio": info.get("hassio"),

View File

@ -60,7 +60,7 @@ async def test_hassio_system_health(hass, aioclient_mock):
"host_os": "Home Assistant OS 5.9", "host_os": "Home Assistant OS 5.9",
"installed_addons": "Awesome Addon (1.0.0)", "installed_addons": "Awesome Addon (1.0.0)",
"supervisor_api": "ok", "supervisor_api": "ok",
"supervisor_version": "2020.11.1", "supervisor_version": "supervisor-2020.11.1",
"supported": True, "supported": True,
"update_channel": "stable", "update_channel": "stable",
"version_api": "ok", "version_api": "ok",