Add device support for Samsung Refrigerator TP1X_REF_21K auto-door variants (issue #328)
Three new dumps from one household's TP1X_REF_21K fleet (regular single-door, kimchi, wine cellar) exposed the Auto Door Open feature's timer and voice/sound feedback toggles, plus wine-cellar-specific coverage: a deodorizing filter at its own href, a multi-compartment pantry select, and a table-revision info resource. - STATUS_LOCK gains auto_door_voice_control/auto_door_sound_control, gated on each field's own presence. - New AUTO_DOOR_TIMER (a discrete-options select, same shape as the DEFINITE_TEMPERATURE_COOLER/FREEZER pattern) and three no-entity AUTO_DOOR_SINGLE/KIMCHI/WINECELLAR coverage hrefs -- every dump seen reports exactly one openOptions value with no paired current/desired field to choose against. - New DEODOR_FILTER (reuses AIR_FILTER's entities at a different href), WINECELLAR_PANTRY_ZONE, and WINECELLAR_INFO. - by_type: oic.d.krefrigerator and x.com.st.d.winecellar routed to the refrigerator registry via /oic/d, alongside the existing modelNum-based routing. - kimchi_zone_mode's translation catalog gains three supportMode codes (bare storage_fridge/storage_freezer without the _normal suffix, and the apparently-placeholder newmode_kimchi_0000) surfaced by the kimchi fixture, across all seven languages. Three new scrubbed fixtures + goldens + tests, one per variant.
This commit is contained in:
20 files changed
+1753
-7
No files matched your search
@@ -1407,6 +1407,64 @@ def test_registry_reproduces_golden_state_keys_for_refrigerator_tp1x_ref_21k_def
|
||||
)
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_refrigerator_tp1x_ref_21k_autodoor():
|
||||
"""TP1X_REF_21K, single-freezer-door Auto Door Open variant (issue
|
||||
#328): /autodoor/single/vs/0 + /autodoor/timer/vs/0, plus
|
||||
STATUS_LOCK's ado.voicecontrol sibling toggle."""
|
||||
from tests.conftest import _load_device
|
||||
|
||||
resources = _load_device("refrigerator_tp1x_ref_21k_autodoor")
|
||||
golden = json.loads((GOLDEN / "refrigerator_tp1x_ref_21k_autodoor.json").read_text())
|
||||
state_keys = _new_state_keys("refrigerator_tp1x_ref_21k_autodoor", 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_refrigerator_tp1x_ref_21k_kimchi():
|
||||
"""Kimchi-refrigerator Auto Door Open variant (issue #328) -- resolves
|
||||
via /oic/d's oic.d.krefrigerator, not modelNum (the board is the same
|
||||
TP1X_REF_21K as the regular fridge, so only the OCF type tells them
|
||||
apart before checking hrefs)."""
|
||||
from tests.conftest import _load_device
|
||||
|
||||
resources = _load_device("refrigerator_tp1x_ref_21k_kimchi")
|
||||
golden = json.loads((GOLDEN / "refrigerator_tp1x_ref_21k_kimchi.json").read_text())
|
||||
state_keys = _new_state_keys(
|
||||
"refrigerator_tp1x_ref_21k_kimchi",
|
||||
resources,
|
||||
device_types=("oic.wk.d", "oic.d.krefrigerator"),
|
||||
)
|
||||
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_refrigerator_winecellar():
|
||||
"""Wine-cellar refrigerator variant (issue #328) -- resolves via /oic/d's
|
||||
x.com.st.d.winecellar, same TP1X_REF_21K board as the other two. Adds
|
||||
the deodorizing filter at its own href, the multi-compartment pantry
|
||||
select, and the table-revision info resource."""
|
||||
from tests.conftest import _load_device
|
||||
|
||||
resources = _load_device("refrigerator_winecellar")
|
||||
golden = json.loads((GOLDEN / "refrigerator_winecellar.json").read_text())
|
||||
state_keys = _new_state_keys(
|
||||
"refrigerator_winecellar",
|
||||
resources,
|
||||
device_types=("oic.wk.d", "x.com.st.d.winecellar"),
|
||||
)
|
||||
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user