Add range/oven detection for boards missing /information/vs/0 (issue #74)
NE63B8411SS reports no oneUiVersion and no /information/vs/0 resource at all, so neither for_device nor for_device_by_model's modelNum tokens have anything to key off -- it fell through to the unknown-device fallback, which also mis-binds /temperatures/vs/0 against fridge.py's setpoint capability (a collision the oven family's own capabilities are normally excluded from the global registry specifically to avoid). Add a resources-based signature to for_device_by_resources(): 'Bake' in /mode/vs/0's supportedModes is oven/range-exclusive vocabulary, and paired with the /oven/vs/0 cavity resource it reliably identifies this family even with no model info at all. Route to 'range' when a cooktop-status resource is also present, else plain 'oven'. This board's cooktop half also doesn't expose the per-burner /cooktop/status/vs/0 array range.py already models -- only the coarser /cooktopmonitoring/vs/0 summary resource. Add a read-only COOKTOP_MONITORING capability for it (cooktop running state, warming center state) rather than leaving it unbound.
This commit is contained in:
10 files changed
+395
No files matched your search
@@ -262,6 +262,26 @@ def test_registry_reproduces_golden_state_keys_for_range():
|
||||
)
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_range_no_info():
|
||||
"""NE63B8411SS (issue #74) -- reports no oneUiVersion *and* no
|
||||
/information/vs/0 at all, so neither for_device nor
|
||||
for_device_by_model has anything to key off; resolved via the 'Bake'-
|
||||
in-supportedModes + /cooktopmonitoring/vs/0 signature in
|
||||
for_device_by_resources. This board's local API has no per-burner
|
||||
/cooktop/status/vs/0 array either -- only the coarse
|
||||
/cooktopmonitoring/vs/0 monitoring resource covered by range.py's
|
||||
COOKTOP_MONITORING."""
|
||||
from tests.conftest import _load_device
|
||||
resources = _load_device('range_no_info')
|
||||
golden = json.loads((GOLDEN / 'range_no_info.json').read_text())
|
||||
state_keys = _new_state_keys('range_no_info', resources)
|
||||
assert set(state_keys) == set(golden['state_keys']), (
|
||||
f"state_keys mismatch:\n"
|
||||
f" extra: {sorted(set(state_keys) - set(golden['state_keys']))}\n"
|
||||
f" missing: {sorted(set(golden['state_keys']) - set(state_keys))}"
|
||||
)
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_air_purifier():
|
||||
"""ARTIK051_TVTL_18K (issue #56) -- reports no oneUiVersion; resolved via
|
||||
the '_TVTL_' modelNum token fallback in for_device_by_model."""
|
||||
|
||||
Reference in new issue
Block a user