Extend AirDresser support to DA_DF_TP2_20_COMMON (#157)
A different board generation from issue #162's DA_DF_A51_20_COMMON, also carrying the '_DF_' modelNum token and so already routed into the air_dresser registry -- but reporting two resources #162's board doesn't: /st/airdressercourse/vs/0 -- the course table id (Table_00), read the same way washer/dryer read /st/washercourse|dryercourse/vs/0. Wired up as AIR_DRESSER_COURSE's table_href and added to the global ignore list, mirroring that existing pair exactly. /airdresseroption/sanitize/vs/0 -- a genuine on/off setting (not covered by any existing capability), added as AIR_DRESSER_SANITIZE. Introducing table_href means the course select's translation_key is now always the table-lookup callable, so the bare 'air_dresser_cycle' catalog entry added for #162 (only ever used when no table_href was passed) is unreachable in every case and is removed -- both boards fall back to the shared 'cycle' entry until their course tables get named, same as washer/dryer's own precedent for an unrecognized table.
This commit is contained in:
9 files changed
+456
-25
No files matched your search
@@ -747,6 +747,27 @@ def test_registry_reproduces_golden_state_keys_for_air_dresser():
|
||||
)
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_air_dresser_tp2_20():
|
||||
"""DA_DF_TP2_20_COMMON AirDresser (model DF9500A, issue #157) -- a
|
||||
different board generation than issue #162's DA_DF_A51_20_COMMON, also
|
||||
routed via the '_DF_' modelNum fallback into the same air_dresser
|
||||
registry. Unlike #162's board, this one populates /wm/editcourse/vs/0's
|
||||
editCourseList directly (no supportedOptions fallback needed) and
|
||||
reports two AirDresser-specific resources #162 doesn't have:
|
||||
/st/airdressercourse/vs/0 (course table id, ignored.py) and
|
||||
/airdresseroption/sanitize/vs/0 (air_dresser.AIR_DRESSER_SANITIZE).
|
||||
Binds cleanly with zero unbound hrefs."""
|
||||
from tests.conftest import _load_device
|
||||
resources = _load_device('air_dresser_tp2_20')
|
||||
golden = json.loads((GOLDEN / 'air_dresser_tp2_20.json').read_text())
|
||||
state_keys = _new_state_keys('air_dresser_tp2_20', 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_resources_from_batch_preferred_over_flat():
|
||||
from tests.conftest import _resources_from_dump
|
||||
dump = {
|
||||
|
||||
Reference in new issue
Block a user