Address Opus review findings on the device-support commits above
- Fix a real bug: airconditioner.SOUND_MODE had no exists_fn, so on boards (issue #319's FAC) that never report a live 'mode' value, entity.py's default field-presence gate silently kept the select from ever registering in HA -- while adapter.flatten() (what the golden/tests read) has no such gate, so the tests passed while documenting behavior the opposite of what shipped. Gate on supportedModes' presence instead. - Add airconditioner.MDS_ABSENCE_CLEAN for the CAC-class board's /mds/absenceclean/vs/0 -- byte-identical shape to issue #319's /csi/absenceclean/vs/0, confirmed rather than guessed, closing one more of that board's documented coverage-gap hrefs. - Add missing translation state labels (all 6 languages) for edge_lighting_mode/edge_lighting_color/indicator_light_mode's raw device codes, so they render as real words instead of a raw '3000K' -> '3000 K' fallback. - Fix an orphaned comment above SOUND_MODE that actually described the unrelated DISPLAY reuse, and correct two inaccurate rationale comments: the sound/voice ignore reason claimed a distinction from SOUND_MODE that this same dump contradicts, and the /csi/* ignore block's 'same reasoning as air_purifier.COVERAGE' precedent only actually covers 1 of its 5 hrefs. - Correct the false 'no board-token match' claim in the FAC test file and golden-regression docstring -- 'FAC' is a real _BOARD_TOKEN_TO_KEY entry (for_device_by_model alone already resolves this board); add a test that actually exercises that path, which nothing previously did despite the docstring's claim. - Drop a tautological burner-slot test that only re-asserted what the golden regression test already covers via the same code path.
This commit is contained in:
13 files changed
+250
-68
No files matched your search
@@ -135,9 +135,11 @@ def test_registry_reproduces_golden_state_keys_for_airconditioner():
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_airconditioner_ailp_fac():
|
||||
"""AILP_DA-AC-FAC-02011_0000 (issue #319) has no board-token match --
|
||||
resolves purely via /oic/d's oic.d.airconditioner type, exercising the
|
||||
device_types-only path through resolve()."""
|
||||
"""AILP_DA-AC-FAC-02011_0000 (issue #319) resolves both ways --
|
||||
modelNum's 'FAC' board token and /oic/d's oic.d.airconditioner type
|
||||
independently agree on the airconditioner registry. Passes
|
||||
device_types through resolve() to exercise that agreement, not because
|
||||
the board token is absent."""
|
||||
from tests.conftest import _load_device
|
||||
|
||||
resources = _load_device("airconditioner_ailp_fac")
|
||||
@@ -1173,10 +1175,9 @@ def test_registry_reproduces_golden_state_keys_for_airconditioner_cac():
|
||||
0.16.0 when oneUiVersion detection was dropped, since 'CAC' had never
|
||||
been added to the modelNum board-token table. Resolved via the new 'CAC'
|
||||
token onto the existing airconditioner registry. Not fully covered yet --
|
||||
three hrefs remain unbound (absence-clean, sound-optimization,
|
||||
smart-sensing-cooling), all genuinely new to this board generation and
|
||||
out of scope for the routing fix; see test_airconditioner_cac.py for
|
||||
the documented gap."""
|
||||
two hrefs remain unbound (sound-optimization, smart-sensing-cooling),
|
||||
both genuinely new to this board generation and out of scope for the
|
||||
routing fix; see test_airconditioner_cac.py for the documented gap."""
|
||||
from tests.conftest import _load_device
|
||||
|
||||
resources = _load_device("airconditioner_cac")
|
||||
|
||||
Reference in new issue
Block a user