fix(homeassistant): storage reads used of total with its percentage, and an OS update is said to wait on a reboot (#6753, #6754)
CI / lint (push) Successful in 2s
CI / unit (push) Successful in 1m36s
CI / integration (push) Successful in 1m59s
CI / publish (push) Successful in 19s

The tile shows Home Assistant's own used figure beside the total, so it matches
Home Assistant's storage page. An OS update doesn't reboot the machine: Supervisor
writes the image, reports the new version and raises a repair asking for a reboot.
The confirmation, schedule warning, MCP docs and plugin docs now say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 18:51:28 -05:00
co-authored by Claude Opus 5.5
parent 5ffececae5
commit 4c57735dd9
8 changed files with 41 additions and 20 deletions
+15 -4
View File
@@ -533,18 +533,29 @@ def test_a_poll_keeps_the_system_problems_and_records_them(app):
assert metrics["problems_open"] == 2.0 and metrics["disk_free_pct"] == 50.0 and metrics["update_failed"] == 0.0
def test_the_page_shows_the_devices_storage_and_how_full_it_is(app):
def test_the_page_shows_storage_used_of_the_total_with_the_percentage(app):
async def go():
await _clean(app, health={"repairs_read": True, "problems": [], "disk_free_gb": 99.8,
"disk_total_gb": 116.5, "disk_free_pct": 85.7})
await _clean(app, health={"repairs_read": True, "problems": [], "disk_free_gb": 99.8, "disk_used_gb": 12.0,
"disk_total_gb": 116.5, "disk_free_pct": 85.7, "disk_used_pct": 10.3})
web, _ = await _admin_client(app)
return await (await web.get("/plugins/homeassistant/")).get_data(as_text=True)
page = asyncio.run(go())
assert "116.5 GB" in page and "14% full" in page
assert "12.0 of 116.5 GB (10%)" in page
assert "Disk free" not in page
def test_the_page_says_an_os_update_waits_on_a_reboot_rather_than_making_one(app):
async def go():
await _clean(app)
web, _ = await _admin_client(app)
return await (await web.get("/plugins/homeassistant/")).get_data(as_text=True)
page = asyncio.run(go())
assert "takes effect only once you reboot the machine" in page
assert "reboots the machine" not in page
def test_a_report_it_couldnt_read_leaves_the_last_one_and_home_assistant_still_answers(app):
sched = _ha("scheduler")
ha = FakeHomeAssistant()