Add dehumidifier display switch and watertank lighting (issues #271, #231)

The TP1X_DA_AC_DHM_01001_0000 revision (model AY70H18100GTD) additionally
reports /display/vs/0 (same shape as air_purifier's screen toggle, reused
directly) and /watertank/lighting/vs/0 (on/off, color, and brightness for
the tank's ambient light, plus a diagnostic alarm-status flag). Both issues
submitted the identical dump, so one fix covers both reports.

Also adds x.com.st.d.dehumidifier to the /oic/d device-type routing table
now that a dump confirms it.
This commit is contained in:
Marc Billow
2026-08-03 18:59:22 +00:00
parent 51103fa341
commit 3ef64eae52
12 changed files with 2018 additions and 1284 deletions
+17
View File
@@ -1226,6 +1226,23 @@ def test_registry_reproduces_golden_state_keys_for_range_ne6516a():
)
def test_registry_reproduces_golden_state_keys_for_dehumidifier_tp1x_dhm01001():
"""TP1X_DA_AC_DHM_01001_0000 revision (issues #271/#231) additionally
reports /display/vs/0 (air_purifier.DISPLAY's exact shape, reused as-is)
and /watertank/lighting/vs/0 (new WATERTANK_LIGHTING capability), both
unbound on the original issue #88 dump."""
from tests.conftest import _load_device
resources = _load_device("dehumidifier_tp1x_dhm01001")
golden = json.loads((GOLDEN / "dehumidifier_tp1x_dhm01001.json").read_text())
state_keys = _new_state_keys("dehumidifier_tp1x_dhm01001", 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