Map remaining coverage-gap hrefs, fix discover() false-gap bug, improve device naming

Maps the fridge/dishwasher hrefs flagged by last session's coverage-gap
Repairs issue: defrost delay (switch) + block status (diagnostic binary
sensor), master ice-maker enable, self-check trigger/status, dishwasher
diagnosis trigger/status, and last-operation-source. Adds fallback
capabilities for /doors, /temperatures, and /icemaker/status that only
bind when the richer per-instance hrefs they duplicate are absent, so
simpler devices without those hrefs still get the data. Everything else
in the original gap list moves to capabilities.ignored (Bixby audio
feedback, inert DR/energy-planner resources, redundant metadata).

Fixes discover() reporting a known href as an unregistered gap whenever
its match_fn declined to bind for that device (e.g. a filter capability
on hardware without that filter) — it's now only a gap when no capability
is registered for the href at all.

Device naming now uses x.com.samsung.da.modelNum (not the OCF /oic/p,d
metadata, which produced inconsistent names like "[dishwasher] Samsung")
to build "Samsung <Type> (<model>)".
This commit is contained in:
Marc Billow committed 2026-07-08 15:24:34 -05:00
1 parent d2699f0f5b
commit 5d1a32aa9a
13 files changed
+279 -23

No files matched your search

+7 -6
View File
@@ -45,14 +45,15 @@ def test_ignored_hrefs_absent_from_refrigerator_gaps():
assert not present_ignored, f"ignored hrefs leaked into gap report: {present_ignored}"
def test_dishwasher_fixture_still_has_genuine_gaps():
def test_dishwasher_fixture_has_no_remaining_gaps():
"""Sanity check that the gap mechanism isn't silencing everything.
If this starts failing because the fixture is now fully covered, that's
good news — just trim the expected set down (or to empty) rather than
deleting the test.
Every href in the dishwasher fixture is now either mapped to a
capability or listed in capabilities.ignored — if this starts failing
because a genuinely new gap appeared, that's the interesting case to
look at (add the href to ignored.py or map it, don't just delete this
assertion).
"""
resources = _load('dishwasher_device.json')
unbound = set(_unbound_hrefs(resources, dishwasher.REGISTRY))
assert '/wm/jobbeginingstatus/vs/0' in unbound
assert '/diagnosis/vs/0' in unbound
assert unbound == set()