Add range/cooktop-oven combo support (issue #44)
TP1X_DA-KS-RANGE-0102X (model NSI6DG9100SRAA) reports no oneUiVersion and previously fell through to the unknown-device fallback, leaving /connected, /cooktop/spec, /cooktop/settings/status, /cooktop/status, and /oven/spec unbound. Add a 'range' device registry that reuses the oven family's cavity/setpoint/mode/operational-state/door capabilities and adds a new cooktop.py module modeling per-burner power level, state, and hot-surface entities (gated so unreported burner slots don't appear), plus a hot-surface auto-shutoff config sensor. Route range/cooktop models to it via a '-RANGE-' modelNum token, mirroring the existing RAC/PRAC air-conditioner fallback pattern. The dryer (DA_WM_TP1_21_COMMON) pause/stop buttons mentioned in the same issue are working as intended -- the reporter confirmed that's an expected in-person-only limitation, not a bug.
This commit is contained in:
8 files changed
+772
-1
No files matched your search
@@ -199,6 +199,23 @@ def test_registry_reproduces_golden_state_keys_for_tp1x_rac():
|
||||
)
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_range():
|
||||
"""Range/cooktop-oven combo (model TP1X_DA-KS-RANGE-0102X, issue #44) --
|
||||
reports no oneUiVersion; resolved via the '-RANGE-' modelNum token
|
||||
fallback in for_device_by_model. Reuses the oven family's cavity/
|
||||
setpoint/mode/operational-state capabilities and adds cooktop.py's
|
||||
per-burner capabilities for the 4 burners this dump reports."""
|
||||
from tests.conftest import _load_device
|
||||
resources = _load_device('range')
|
||||
golden = json.loads((GOLDEN / 'range.json').read_text())
|
||||
state_keys = _new_state_keys('range', 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