This board (a floor-standing + wall-mounted indoor unit pair sharing one outdoor unit and one local IP) reports no oneUiVersion and carries the '_FAC_' modelNum token, which no existing routing rule matched -- it fell back to 'unknown' and exposed nothing but a power switch, with no climate entity generated at all (both issues' reported symptom). Once routed to the existing airconditioner registry, it binds cleanly against the exact same CLIMATE composite every other room-AC family uses -- same Cool/Dry/Wind/AIComfort mode vocabulary, same wind-strength/humidity/ filter/energy resource shapes already modeled. Only two hrefs are unique to this board: /subdevices/vs/0 (an opaque paired-subdevice id list -- issue #150 asked whether the second indoor unit can be controlled separately; it can't through this or any other resource in the dump, the same "remote device ids, not locally actionable" role as the existing /remotedeviceinfo/vs/0 ignore) and /runn/vs/0 (a single undocumented int with no supported-values list to interpret). Both added to _AC_IGNORED rather than guessed at.
This commit is contained in:
7 files changed
+558
-2
No files matched your search
@@ -786,6 +786,26 @@ def test_registry_reproduces_golden_state_keys_for_air_purifier_vtww():
|
||||
)
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_airconditioner_fac_bora():
|
||||
"""TP2X_FAC_BORA_21K Wind-Free 2-in-1 (floor-standing + wall-mounted
|
||||
indoor units sharing one outdoor unit and one local IP, issues
|
||||
#150/#153) -- reports no oneUiVersion; resolved via the '_FAC_'
|
||||
modelNum fallback. Binds cleanly against the existing airconditioner
|
||||
registry (including a real climate entity, the actual reported gap)
|
||||
with zero unbound hrefs -- /subdevices/vs/0 and /runn/vs/0 are the only
|
||||
hrefs this board reports that no other AC family does, both added to
|
||||
_AC_IGNORED as undocumented/not-locally-actionable."""
|
||||
from tests.conftest import _load_device
|
||||
resources = _load_device('airconditioner_fac_bora')
|
||||
golden = json.loads((GOLDEN / 'airconditioner_fac_bora.json').read_text())
|
||||
state_keys = _new_state_keys('airconditioner_fac_bora', 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